From 41116c17ddb85e6015a5fd2f8c9cfd237f21889a Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Wed, 11 Dec 2019 12:15:54 -0800 Subject: [PATCH 001/181] chore: add initial files for launch --- .../CODE_OF_CONDUCT.md | 43 ++++ .../CONTRIBUTING.md | 65 ++++++ packages/google-monitoring-dashboard/LICENSE | 202 ++++++++++++++++++ .../google-monitoring-dashboard/README.md | 95 ++++++++ packages/google-monitoring-dashboard/synth.py | 64 ++++++ 5 files changed, 469 insertions(+) create mode 100644 packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md create mode 100644 packages/google-monitoring-dashboard/CONTRIBUTING.md create mode 100644 packages/google-monitoring-dashboard/LICENSE create mode 100644 packages/google-monitoring-dashboard/README.md create mode 100644 packages/google-monitoring-dashboard/synth.py diff --git a/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md b/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +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. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/packages/google-monitoring-dashboard/CONTRIBUTING.md b/packages/google-monitoring-dashboard/CONTRIBUTING.md new file mode 100644 index 00000000000..f6c4cf010e3 --- /dev/null +++ b/packages/google-monitoring-dashboard/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/packages/google-monitoring-dashboard/LICENSE b/packages/google-monitoring-dashboard/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md new file mode 100644 index 00000000000..9a8c9e1899a --- /dev/null +++ b/packages/google-monitoring-dashboard/README.md @@ -0,0 +1,95 @@ +[//]: # "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 + +# [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/dashboard.svg)](https://www.npmjs.org/package/dashboard) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) + + + + +Dashboard client for Node.js + + +* [Monitoring Dashboards Node.js Client API Reference][client-docs] +* [Monitoring Dashboards Documentation][product-docs] +* [github.com/googleapis/nodejs-monitoring-dashboards](https://github.com/googleapis/nodejs-monitoring-dashboards) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Monitoring Dashboards 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 dashboard +``` + + + + + +The [Monitoring Dashboards Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/CONTRIBUTING.md). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/dashboard/latest +[product-docs]: https://cloud.google.com/monitoring/docs +[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=monitoring.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py new file mode 100644 index 00000000000..7049597473f --- /dev/null +++ b/packages/google-monitoring-dashboard/synth.py @@ -0,0 +1,64 @@ +# 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. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICMicrogenerator() +versions = ['v1'] +for version in versions: + library = gapic.typescript_library( + '@google-cloud/monitoring-dashboard', + generator_args={ + }, + proto_path='/google/monitoring/dashboard/v1', + version=version) +s.copy(library, excludes=['README.md']) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library(source_location='build/src') +s.copy(templates, excludes=[]) + +# Node.js specific cleanup +subprocess.run(['rm', '-rf', './system-test/fixtures']) +subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'run', 'fix']) + +# Add missing jsdoc annotations: +s.replace("src/index.js", +r"""\/\*\* + \* @namespace google + \*/""", +r"""/** + * @namespace google + */ +/** + * @namespace google.rpc + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.longrunning + */""") +s.replace("src/index.js", +r"namespace google.cloud.cloudbuild", +r"namespace google.devtools.cloudbuild") From 2311ea19495961c9865b63f1843a9bbbd710fd63 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 3 Jan 2020 16:10:23 -0800 Subject: [PATCH 002/181] feat!: initial generation of library (#1) --- .../google-monitoring-dashboard/.eslintignore | 5 + .../google-monitoring-dashboard/.eslintrc.yml | 15 + .../google-monitoring-dashboard/.gitignore | 15 + .../google-monitoring-dashboard/.jsdoc.js | 48 + packages/google-monitoring-dashboard/.nycrc | 24 + .../.prettierignore | 3 + .../google-monitoring-dashboard/.prettierrc | 8 + .../.repo-metadata.json | 13 + .../google-monitoring-dashboard/README.md | 48 +- .../google-monitoring-dashboard/codecov.yaml | 4 + .../linkinator.config.json | 11 + .../google-monitoring-dashboard/package.json | 55 + .../monitoring/dashboard/v1/common.proto | 397 + .../monitoring/dashboard/v1/dashboard.proto | 59 + .../dashboard/v1/dashboards_service.proto | 158 + .../monitoring/dashboard/v1/drilldowns.proto | 23 + .../monitoring/dashboard/v1/layouts.proto | 74 + .../monitoring/dashboard/v1/metrics.proto | 165 + .../monitoring/dashboard/v1/scorecard.proto | 110 + .../monitoring/dashboard/v1/service.proto | 23 + .../google/monitoring/dashboard/v1/text.proto | 44 + .../monitoring/dashboard/v1/widget.proto | 51 + .../monitoring/dashboard/v1/xychart.proto | 146 + .../protos/protos.d.ts | 6981 ++++++ .../protos/protos.js | 18138 ++++++++++++++++ .../protos/protos.json | 1784 ++ .../samples/README.md | 50 + .../samples/package.json | 23 + .../samples/quickstart.js | 46 + .../samples/test/quickstart.js | 37 + .../google-monitoring-dashboard/src/index.ts | 24 + .../src/v1/dashboards_service_client.ts | 771 + .../v1/dashboards_service_client_config.json | 46 + .../src/v1/dashboards_service_proto_list.json | 13 + .../src/v1/index.ts | 19 + .../synth.metadata | 360 + packages/google-monitoring-dashboard/synth.py | 29 +- .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 25 + .../system-test/install.ts | 51 + .../test/gapic-dashboards_service-v1.ts | 331 + .../google-monitoring-dashboard/tsconfig.json | 19 + .../google-monitoring-dashboard/tslint.json | 3 + .../webpack.config.js | 64 + 44 files changed, 30310 insertions(+), 30 deletions(-) create mode 100644 packages/google-monitoring-dashboard/.eslintignore create mode 100644 packages/google-monitoring-dashboard/.eslintrc.yml create mode 100644 packages/google-monitoring-dashboard/.gitignore create mode 100644 packages/google-monitoring-dashboard/.jsdoc.js create mode 100644 packages/google-monitoring-dashboard/.nycrc create mode 100644 packages/google-monitoring-dashboard/.prettierignore create mode 100644 packages/google-monitoring-dashboard/.prettierrc create mode 100644 packages/google-monitoring-dashboard/.repo-metadata.json create mode 100644 packages/google-monitoring-dashboard/codecov.yaml create mode 100644 packages/google-monitoring-dashboard/linkinator.config.json create mode 100644 packages/google-monitoring-dashboard/package.json create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto create mode 100644 packages/google-monitoring-dashboard/protos/protos.d.ts create mode 100644 packages/google-monitoring-dashboard/protos/protos.js create mode 100644 packages/google-monitoring-dashboard/protos/protos.json create mode 100644 packages/google-monitoring-dashboard/samples/README.md create mode 100644 packages/google-monitoring-dashboard/samples/package.json create mode 100644 packages/google-monitoring-dashboard/samples/quickstart.js create mode 100644 packages/google-monitoring-dashboard/samples/test/quickstart.js create mode 100644 packages/google-monitoring-dashboard/src/index.ts create mode 100644 packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts create mode 100644 packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json create mode 100644 packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json create mode 100644 packages/google-monitoring-dashboard/src/v1/index.ts create mode 100644 packages/google-monitoring-dashboard/synth.metadata create mode 100644 packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-monitoring-dashboard/system-test/install.ts create mode 100644 packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts create mode 100644 packages/google-monitoring-dashboard/tsconfig.json create mode 100644 packages/google-monitoring-dashboard/tslint.json create mode 100644 packages/google-monitoring-dashboard/webpack.config.js diff --git a/packages/google-monitoring-dashboard/.eslintignore b/packages/google-monitoring-dashboard/.eslintignore new file mode 100644 index 00000000000..09b31fe735a --- /dev/null +++ b/packages/google-monitoring-dashboard/.eslintignore @@ -0,0 +1,5 @@ +**/node_modules +src/**/doc/* +build/ +docs/ +protos/ diff --git a/packages/google-monitoring-dashboard/.eslintrc.yml b/packages/google-monitoring-dashboard/.eslintrc.yml new file mode 100644 index 00000000000..73eeec27612 --- /dev/null +++ b/packages/google-monitoring-dashboard/.eslintrc.yml @@ -0,0 +1,15 @@ +--- +extends: + - 'eslint:recommended' + - 'plugin:node/recommended' + - prettier +plugins: + - node + - prettier +rules: + prettier/prettier: error + block-scoped-var: error + eqeqeq: error + no-warning-comments: warn + no-var: error + prefer-const: error diff --git a/packages/google-monitoring-dashboard/.gitignore b/packages/google-monitoring-dashboard/.gitignore new file mode 100644 index 00000000000..e1a76628b30 --- /dev/null +++ b/packages/google-monitoring-dashboard/.gitignore @@ -0,0 +1,15 @@ +**/*.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-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js new file mode 100644 index 00000000000..33a405b53be --- /dev/null +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -0,0 +1,48 @@ +// 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 +// +// 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'; + +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' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2018 Google, LLC.', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/monitoring-dashboards', + theme: 'lumen' + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-monitoring-dashboard/.nycrc b/packages/google-monitoring-dashboard/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-monitoring-dashboard/.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-monitoring-dashboard/.prettierignore b/packages/google-monitoring-dashboard/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/packages/google-monitoring-dashboard/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-monitoring-dashboard/.prettierrc b/packages/google-monitoring-dashboard/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/packages/google-monitoring-dashboard/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/packages/google-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json new file mode 100644 index 00000000000..fd7d764d6df --- /dev/null +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "monitoring-dashboards", + "name_pretty": "Monitoring Dashboards", + "product_documentation": "https://cloud.google.com/monitoring/docs", + "client_documentation": "https://googleapis.dev/nodejs/monitoring-dashboards/latest", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-monitoring-dashboards", + "distribution_name": "@google-cloud/monitoring-dashboards", + "api_id": "monitoring.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 9a8c9e1899a..81f19ea8046 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -5,13 +5,13 @@ # [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/dashboard.svg)](https://www.npmjs.org/package/dashboard) +[![npm version](https://img.shields.io/npm/v/@google-cloud/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) -Dashboard client for Node.js +interact with dashboards for viewing and analyzing metric data * [Monitoring Dashboards Node.js Client API Reference][client-docs] @@ -29,8 +29,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -48,10 +48,46 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install dashboard +npm install @google-cloud/monitoring-dashboards ``` +### Using the client library + +```javascript + // Imports the Google Cloud client library + const { + DashboardsServiceClient, + } = require('@google-cloud/monitoring-dashboards'); + + // Creates a client + const ds = new DashboardsServiceClient(); + + // parent = 'projects/my-project', // Project to list dashboards for. + + async function listDashboards() { + const [dashboards] = await ds.listDashboards({ + parent, + }); + console.info('Listing Dashboards:'); + for (const dashboard of dashboards) { + console.info(`\t${dashboard.displayName}`); + } + } + listDashboards(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring-dashboards/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -86,7 +122,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/dashboard/latest +[client-docs]: https://googleapis.dev/nodejs/monitoring-dashboards/latest [product-docs]: https://cloud.google.com/monitoring/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project diff --git a/packages/google-monitoring-dashboard/codecov.yaml b/packages/google-monitoring-dashboard/codecov.yaml new file mode 100644 index 00000000000..5724ea9478d --- /dev/null +++ b/packages/google-monitoring-dashboard/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json new file mode 100644 index 00000000000..e689c5b1b54 --- /dev/null +++ b/packages/google-monitoring-dashboard/linkinator.config.json @@ -0,0 +1,11 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "https://www.npmjs.org/package/@google-cloud/monitoring-dashboards", + "https://googleapis.dev/nodejs/monitoring-dashboards/latest", + "https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/samples/quickstart.js", + "https://github.com/googleapis/nodejs-monitoring-dashboards/tree/master/samples" + ] +} diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json new file mode 100644 index 00000000000..805c436fabf --- /dev/null +++ b/packages/google-monitoring-dashboard/package.json @@ -0,0 +1,55 @@ +{ + "name": "@google-cloud/monitoring-dashboards", + "version": "0.1.0", + "description": "interact with dashboards for viewing and analyzing metric data", + "repository": "googleapis/nodejs-monitoring-dashboards", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix && eslint samples --fix", + "lint": "gts check && eslint samples", + "predocs-test": "npm run docs", + "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 && cd ../" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.9.0", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.2", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", + "prettier": "^1.19.1", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=10" + } +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto new file mode 100644 index 00000000000..f1c5b987544 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -0,0 +1,397 @@ +// 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.monitoring.dashboard.v1; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Describes how to combine multiple time series to provide different views of +// the data. Aggregation consists of an alignment step on individual time +// series (`alignment_period` and `per_series_aligner`) followed by an optional +// reduction step of the data across the aligned time series +// (`cross_series_reducer` and `group_by_fields`). For more details, see +// [Aggregation](/monitoring/api/learn_more#aggregation). +message Aggregation { + // The Aligner describes how to bring the data points in a single + // time series into temporal alignment. + enum Aligner { + // No alignment. Raw data is returned. Not valid if cross-time + // series reduction is requested. The value type of the result is + // the same as the value type of the input. + ALIGN_NONE = 0; + + // Align and convert to delta metric type. This alignment is valid + // for cumulative metrics and delta metrics. Aligning an existing + // delta metric to a delta metric requires that the alignment + // period be increased. The value type of the result is the same + // as the value type of the input. + // + // One can think of this aligner as a rate but without time units; that + // is, the output is conceptually (second_point - first_point). + ALIGN_DELTA = 1; + + // Align and convert to a rate. This alignment is valid for + // cumulative metrics and delta metrics with numeric values. The output is a + // gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // + // One can think of this aligner as conceptually providing the slope of + // the line that passes through the value at the start and end of the + // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), + // and the output unit is one that has a "/time" dimension. + // + // If, by rate, you are looking for percentage change, see the + // `ALIGN_PERCENT_CHANGE` aligner option. + ALIGN_RATE = 2; + + // Align by interpolating between adjacent points around the + // period boundary. This alignment is valid for gauge + // metrics with numeric values. The value type of the result is the same + // as the value type of the input. + ALIGN_INTERPOLATE = 3; + + // Align by shifting the oldest data point before the period + // boundary to the boundary. This alignment is valid for gauge + // metrics. The value type of the result is the same as the + // value type of the input. + ALIGN_NEXT_OLDER = 4; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the minimum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MIN = 10; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the maximum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MAX = 11; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the average or arithmetic mean of all + // data points in the period. This alignment is valid for gauge and delta + // metrics with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_MEAN = 12; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // or Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT = 13; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the sum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // and distribution values. The value type of the output is the + // same as the value type of the input. + ALIGN_SUM = 14; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the standard deviation of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_STDDEV = 15; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of True-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_TRUE = 16; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of False-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_FALSE = 24; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the fraction of True-valued data points in the + // period. This alignment is valid for gauge metrics with Boolean values. + // The output value is in the range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_FRACTION_TRUE = 17; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 99th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_99 = 18; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 95th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_95 = 19; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 50th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_50 = 20; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 5th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_05 = 21; + + // Align and convert to a percentage change. This alignment is valid for + // gauge and delta metrics with numeric values. This alignment conceptually + // computes the equivalent of "((current - previous)/previous)*100" + // where previous value is determined based on the alignmentPeriod. + // In the event that previous is 0 the calculated value is infinity with the + // exception that if both (current - previous) and previous are 0 the + // calculated value is 0. + // A 10 minute moving mean is computed at each point of the time window + // prior to the above calculation to smooth the metric and prevent false + // positives from very short lived spikes. + // Only applicable for data that is >= 0. Any values < 0 are treated as + // no data. While delta metrics are accepted by this alignment special care + // should be taken that the values for the metric will always be positive. + // The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENT_CHANGE = 23; + } + + // A Reducer describes how to aggregate data points from multiple + // time series into a single time series. + enum Reducer { + // No cross-time series reduction. The output of the aligner is + // returned. + REDUCE_NONE = 0; + + // Reduce by computing the mean across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric or distribution values. The value type of the + // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_MEAN = 1; + + // Reduce by computing the minimum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MIN = 2; + + // Reduce by computing the maximum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MAX = 3; + + // Reduce by computing the sum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric and distribution values. The value type of + // the output is the same as the value type of the input. + REDUCE_SUM = 4; + + // Reduce by computing the standard deviation across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics with numeric or distribution values. The value type of + // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_STDDEV = 5; + + // Reduce by computing the count of data points across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics of numeric, Boolean, distribution, and string value + // type. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT = 6; + + // Reduce by computing the count of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_TRUE = 7; + + // Reduce by computing the count of False-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_FALSE = 15; + + // Reduce by computing the fraction of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The output value is in the + // range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_FRACTION_TRUE = 8; + + // Reduce by computing 99th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_99 = 9; + + // Reduce by computing 95th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_95 = 10; + + // Reduce by computing 50th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_50 = 11; + + // Reduce by computing 5th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_05 = 12; + } + + // The alignment period for per-[time series][TimeSeries] + // alignment. If present, `alignmentPeriod` must be at least 60 + // seconds. After per-time series alignment, each time series will + // contain data points only on the period boundaries. If + // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then + // this field is ignored. If `perSeriesAligner` is specified and + // does not equal `ALIGN_NONE`, then this field must be defined; + // otherwise an error is returned. + google.protobuf.Duration alignment_period = 1; + + // The approach to be used to align individual time series. Not all + // alignment functions may be applied to all time series, depending + // on the metric type and value type of the original time + // series. Alignment may change the metric type or the value type of + // the time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Aligner per_series_aligner = 2; + + // The approach to be used to combine time series. Not all reducer + // functions may be applied to all time series, depending on the + // metric type and the value type of the original time + // series. Reduction may change the metric type of value type of the + // time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Reducer cross_series_reducer = 4; + + // The set of fields to preserve when `crossSeriesReducer` is + // specified. The `groupByFields` determine how the time series are + // partitioned into subsets prior to applying the aggregation + // function. Each subset contains time series that have the same + // value for each of the grouping fields. Each individual time + // series is a member of exactly one subset. The + // `crossSeriesReducer` is applied to each subset of time series. + // It is not possible to reduce across different resource types, so + // this field implicitly contains `resource.type`. Fields not + // specified in `groupByFields` are aggregated away. If + // `groupByFields` is not specified and all the time series have + // the same resource type, then the time series are aggregated into + // a single output time series. If `crossSeriesReducer` is not + // defined, this field is ignored. + repeated string group_by_fields = 5; +} + +// Describes a ranking-based time series filter. Each input time series is +// ranked with an aligner. The filter lets through up to `num_time_series` time +// series, selecting them based on the relative ranking. +message PickTimeSeriesFilter { + // The value reducers that can be applied to a PickTimeSeriesFilter. + enum Method { + // Not allowed in well-formed requests. + METHOD_UNSPECIFIED = 0; + + // Select the mean of all values. + METHOD_MEAN = 1; + + // Select the maximum value. + METHOD_MAX = 2; + + // Select the minimum value. + METHOD_MIN = 3; + + // Compute the sum of all values. + METHOD_SUM = 4; + + // Select the most recent value. + METHOD_LATEST = 5; + } + + // Describes the ranking directions. + enum Direction { + // Not allowed in well-formed requests. + DIRECTION_UNSPECIFIED = 0; + + // Pass the highest ranking inputs. + TOP = 1; + + // Pass the lowest ranking inputs. + BOTTOM = 2; + } + + // `rankingMethod` is applied to each time series independently to produce the + // value which will be used to compare the time series to other time series. + Method ranking_method = 1; + + // How many time series to return. + int32 num_time_series = 2; + + // How to use the ranking to select time series that pass through the filter. + Direction direction = 3; +} + +// A filter that ranks streams based on their statistical relation to other +// streams in a request. +message StatisticalTimeSeriesFilter { + // The filter methods that can be applied to a stream. + enum Method { + // Not allowed in well-formed requests. + METHOD_UNSPECIFIED = 0; + + // Compute the outlier score of each stream. + METHOD_CLUSTER_OUTLIER = 1; + } + + // `rankingMethod` is applied to a set of time series, and then the produced + // value for each individual time series is used to compare a given time + // series to others. + // These are methods that cannot be applied stream-by-stream, but rather + // require the full context of a request to evaluate time series. + Method ranking_method = 1; + + // How many time series to output. + int32 num_time_series = 2; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto new file mode 100644 index 00000000000..20ddccfc50e --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -0,0 +1,59 @@ +// 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.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/layouts.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "DashboardsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A Google Stackdriver dashboard. Dashboards define the content and layout +// of pages in the Stackdriver web application. +message Dashboard { + // The resource name of the dashboard. + string name = 1; + + // The mutable, human-readable name. + string display_name = 2; + + // `etag` is used for optimistic concurrency control as a way to help + // prevent simultaneous updates of a policy from overwriting each other. + // An `etag` is returned in the response to `GetDashboard`, and + // users are expected to put that etag in the request to `UpdateDashboard` to + // ensure that their change will be applied to the same version of the + // Dashboard configuration. The field should not be passed during + // dashboard creation. + string etag = 4; + + // A dashboard's root container element that defines the layout style. + oneof layout { + // Content is arranged with a basic layout that re-flows a simple list of + // informational elements like widgets or tiles. + GridLayout grid_layout = 5; + + // The content is divided into equally spaced rows and the widgets are + // arranged horizontally. + RowLayout row_layout = 8; + + // The content is divided into equally spaced columns and the widgets are + // arranged vertically. + ColumnLayout column_layout = 9; + } +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto new file mode 100644 index 00000000000..9b7c0152ab1 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -0,0 +1,158 @@ +// 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.monitoring.dashboard.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/dashboard.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "DashboardsServiceProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Manages Stackdriver dashboards. A dashboard is an arrangement of data display +// widgets in a specific layout. +service DashboardsService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read," + "https://www.googleapis.com/auth/monitoring.write"; + + // Creates a new custom dashboard. + // + // This method requires the `monitoring.dashboards.create` permission + // on the specified project. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/dashboards" + body: "dashboard" + }; + } + + // Lists the existing dashboards. + // + // This method requires the `monitoring.dashboards.list` permission + // on the specified project. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/dashboards" + }; + } + + // Fetches a specific dashboard. + // + // This method requires the `monitoring.dashboards.get` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc GetDashboard(GetDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + get: "/v1/{name=projects/*/dashboards/*}" + }; + } + + // Deletes an existing custom dashboard. + // + // This method requires the `monitoring.dashboards.delete` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc DeleteDashboard(DeleteDashboardRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/dashboards/*}" + }; + } + + // Replaces an existing custom dashboard with a new definition. + // + // This method requires the `monitoring.dashboards.update` permission + // on the specified dashboard. For more information, see + // [Google Cloud IAM](https://cloud.google.com/iam). + rpc UpdateDashboard(UpdateDashboardRequest) returns (Dashboard) { + option (google.api.http) = { + patch: "/v1/{dashboard.name=projects/*/dashboards/*}" + body: "dashboard" + }; + } +} + +// The `CreateDashboard` request. +message CreateDashboardRequest { + // Required. The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. The {project_id_or_number} must match + // the dashboard resource name. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The initial dashboard specification. + Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The `ListDashboards` request. +message ListDashboardsRequest { + // Required. The scope of the dashboards to list. A project scope must be + // specified in the form of `"projects/{project_id_or_number}"`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // A positive number that is the maximum number of results to return. + // If unspecified, a default of 1000 is used. + int32 page_size = 2; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 3; +} + +// The `ListDashboards` request. +message ListDashboardsResponse { + // The list of requested dashboards. + repeated Dashboard dashboards = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `GetDashboard` request. +message GetDashboardRequest { + // Required. The resource name of the Dashboard. The format is one of + // `"dashboards/{dashboard_id}"` (for system dashboards) or + // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"` + // (for custom dashboards). + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The `DeleteDashboard` request. +message DeleteDashboardRequest { + // Required. The resource name of the Dashboard. The format is + // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The `UpdateDashboard` request. +message UpdateDashboardRequest { + // Required. The dashboard that will replace the existing dashboard. + Dashboard dashboard = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto new file mode 100644 index 00000000000..cb9fefe32f7 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -0,0 +1,23 @@ +// 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.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "DrilldownsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto new file mode 100644 index 00000000000..23cb8423dc2 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -0,0 +1,74 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/widget.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "LayoutsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A basic layout divides the available space into vertical columns of equal +// width and arranges a list of widgets using a row-first strategy. +message GridLayout { + // The number of columns into which the view's width is divided. If omitted + // or set to zero, a system default will be used while rendering. + int64 columns = 1; + + // The informational elements that are arranged into the columns row-first. + repeated Widget widgets = 2; +} + +// A simplified layout that divides the available space into rows +// and arranges a set of widgets horizontally in each row. +message RowLayout { + // Defines the layout properties and content for a row. + message Row { + // The relative weight of this row. The row weight is used to adjust the + // height of rows on the screen (relative to peers). Greater the weight, + // greater the height of the row on the screen. If omitted, a value + // of 1 is used while rendering. + int64 weight = 1; + + // The display widgets arranged horizontally in this row. + repeated Widget widgets = 2; + } + + // The rows of content to display. + repeated Row rows = 1; +} + +// A simplified layout that divides the available space into vertical columns +// and arranges a set of widgets vertically in each column. +message ColumnLayout { + // Defines the layout properties and content for a column. + message Column { + // The relative weight of this column. The column weight is used to adjust + // the width of columns on the screen (relative to peers). + // Greater the weight, greater the width of the column on the screen. + // If omitted, a value of 1 is used while rendering. + int64 weight = 1; + + // The display widgets arranged vertically in this column. + repeated Widget widgets = 2; + } + + // The columns of content to display. + repeated Column columns = 1; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto new file mode 100644 index 00000000000..1b051aa16c5 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -0,0 +1,165 @@ +// 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.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/common.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "MetricsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// TimeSeriesQuery collects the set of supported methods for querying time +// series data from the Stackdriver metrics API. +message TimeSeriesQuery { + // Parameters needed to obtain data for the chart. + oneof source { + // Filter parameters to fetch time series. + TimeSeriesFilter time_series_filter = 1; + + // Parameters to fetch a ratio between two time series filters. + TimeSeriesFilterRatio time_series_filter_ratio = 2; + } + + // The unit of data contained in fetched time series. If non-empty, this + // unit will override any unit that accompanies fetched data. The format is + // the same as the + // [`unit`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) + // field in `MetricDescriptor`. + string unit_override = 5; +} + +// A filter that defines a subset of time series data that is displayed in a +// widget. Time series data is fetched using the +// [`ListTimeSeries`](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) +// method. +message TimeSeriesFilter { + // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the + // metric types, resources, and projects to query. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // By default, the raw time series data is returned. + // Use this field to combine multiple time series for different views of the + // data. + Aggregation aggregation = 2; + + // Selects an optional time series filter. + oneof output_filter { + // Ranking based time series filter. + PickTimeSeriesFilter pick_time_series_filter = 4; + + // Statistics based time series filter. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + } +} + +// A pair of time series filters that define a ratio computation. The output +// time series is the pair-wise division of each aligned element from the +// numerator and denominator time series. +message TimeSeriesFilterRatio { + // Describes a query to build the numerator or denominator of a + // TimeSeriesFilterRatio. + message RatioPart { + // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the + // metric types, resources, and projects to query. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // By default, the raw time series data is returned. + // Use this field to combine multiple time series for different views of the + // data. + Aggregation aggregation = 2; + } + + // The numerator of the ratio. + RatioPart numerator = 1; + + // The denominator of the ratio. + RatioPart denominator = 2; + + // Apply a second aggregation after the ratio is computed. + Aggregation secondary_aggregation = 3; + + // Selects an optional filter that is applied to the time series after + // computing the ratio. + oneof output_filter { + // Ranking based time series filter. + PickTimeSeriesFilter pick_time_series_filter = 4; + + // Statistics based time series filter. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + } +} + +// Defines a threshold for categorizing time series values. +message Threshold { + // The color suggests an interpretation to the viewer when actual values cross + // the threshold. Comments on each color provide UX guidance on how users can + // be expected to interpret a given state color. + enum Color { + // Color is unspecified. Not allowed in well-formed requests. + COLOR_UNSPECIFIED = 0; + + // Crossing the threshold is "concerning" behavior. + YELLOW = 4; + + // Crossing the threshold is "emergency" behavior. + RED = 6; + } + + // Whether the threshold is considered crossed by an actual value above or + // below its threshold value. + enum Direction { + // Not allowed in well-formed requests. + DIRECTION_UNSPECIFIED = 0; + + // The threshold will be considered crossed if the actual value is above + // the threshold value. + ABOVE = 1; + + // The threshold will be considered crossed if the actual value is below + // the threshold value. + BELOW = 2; + } + + // A label for the threshold. + string label = 1; + + // The value of the threshold. The value should be defined in the native scale + // of the metric. + double value = 2; + + // The state color for this threshold. Color is not allowed in a XyChart. + Color color = 3; + + // The direction for the current threshold. Direction is not allowed in a + // XyChart. + Direction direction = 4; +} + +// Defines the possible types of spark chart supported by the `Scorecard`. +enum SparkChartType { + // Not allowed in well-formed requests. + SPARK_CHART_TYPE_UNSPECIFIED = 0; + + // The sparkline will be rendered as a small line chart. + SPARK_LINE = 1; + + // The sparkbar will be rendered as a small bar chart. + SPARK_BAR = 2; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto new file mode 100644 index 00000000000..0af0af40898 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -0,0 +1,110 @@ +// 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.monitoring.dashboard.v1; + +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "ScorecardProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A widget showing the latest value of a metric, and how this value relates to +// one or more thresholds. +message Scorecard { + // A gauge chart shows where the current value sits within a pre-defined + // range. The upper and lower bounds should define the possible range of + // values for the scorecard's query (inclusive). + message GaugeView { + // The lower bound for this gauge chart. The value of the chart should + // always be greater than or equal to this. + double lower_bound = 1; + + // The upper bound for this gauge chart. The value of the chart should + // always be less than or equal to this. + double upper_bound = 2; + } + + // A sparkChart is a small chart suitable for inclusion in a table-cell or + // inline in text. This message contains the configuration for a sparkChart + // to show up on a Scorecard, showing recent trends of the scorecard's + // timeseries. + message SparkChartView { + // The type of sparkchart to show in this chartView. + SparkChartType spark_chart_type = 1; + + // The lower bound on data point frequency in the chart implemented by + // specifying the minimum alignment period to use in a time series query. + // For example, if the data is published once every 10 minutes it would not + // make sense to fetch and align data at one minute intervals. This field is + // optional and exists only as a hint. + google.protobuf.Duration min_alignment_period = 2; + } + + // Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1; + + // Defines the optional additional chart shown on the scorecard. If + // neither is included - then a default scorecard is shown. + oneof data_view { + // Will cause the scorecard to show a gauge chart. + GaugeView gauge_view = 4; + + // Will cause the scorecard to show a spark chart. + SparkChartView spark_chart_view = 5; + } + + // The thresholds used to determine the state of the scorecard given the + // time series' current value. For an actual value x, the scorecard is in a + // danger state if x is less than or equal to a danger threshold that triggers + // below, or greater than or equal to a danger threshold that triggers above. + // Similarly, if x is above/below a warning threshold that triggers + // above/below, then the scorecard is in a warning state - unless x also puts + // it in a danger state. (Danger trumps warning.) + // + // As an example, consider a scorecard with the following four thresholds: + // { + // value: 90, + // category: 'DANGER', + // trigger: 'ABOVE', + // }, + // { + // value: 70, + // category: 'WARNING', + // trigger: 'ABOVE', + // }, + // { + // value: 10, + // category: 'DANGER', + // trigger: 'BELOW', + // }, + // { + // value: 20, + // category: 'WARNING', + // trigger: 'BELOW', + // } + // + // Then: values less than or equal to 10 would put the scorecard in a DANGER + // state, values greater than 10 but less than or equal to 20 a WARNING state, + // values strictly between 20 and 70 an OK state, values greater than or equal + // to 70 but less than 90 a WARNING state, and values greater than or equal to + // 90 a DANGER state. + repeated Threshold thresholds = 6; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto new file mode 100644 index 00000000000..74290edd6d5 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -0,0 +1,23 @@ +// 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.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringProto"; +option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto new file mode 100644 index 00000000000..2b2236712c8 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -0,0 +1,44 @@ +// 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.monitoring.dashboard.v1; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "TextProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A widget that displays textual content. +message Text { + // The format type of the text content. + enum Format { + // Format is unspecified. Defaults to MARKDOWN. + FORMAT_UNSPECIFIED = 0; + + // The text contains Markdown formatting. + MARKDOWN = 1; + + // The text contains no special formatting. + RAW = 2; + } + + // The text content to be displayed. + string content = 1; + + // How the text content is formatted. + Format format = 2; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto new file mode 100644 index 00000000000..4316aa9964f --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -0,0 +1,51 @@ +// 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.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/scorecard.proto"; +import "google/monitoring/dashboard/v1/text.proto"; +import "google/monitoring/dashboard/v1/xychart.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "WidgetProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// Widget contains a single dashboard component and configuration of how to +// present the component in the dashboard. +message Widget { + // Optional. The title of the widget. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Content defines the component used to populate the widget. + oneof content { + // A chart of time series data. + XyChart xy_chart = 2; + + // A scorecard summarizing time series data. + Scorecard scorecard = 3; + + // A raw string or markdown displaying textual content. + Text text = 4; + + // A blank space. + google.protobuf.Empty blank = 5; + } +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto new file mode 100644 index 00000000000..8fe3d660a38 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -0,0 +1,146 @@ +// 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.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "XyChartProto"; +option java_package = "com.google.monitoring.dashboard.v1"; + +// A chart that displays data on a 2D (X and Y axes) plane. +message XyChart { + // Groups a time series query definition with charting options. + message DataSet { + // The types of plotting strategies for data sets. + enum PlotType { + // Plot type is unspecified. The view will default to `LINE`. + PLOT_TYPE_UNSPECIFIED = 0; + + // The data is plotted as a set of lines (one line per series). + LINE = 1; + + // The data is plotted as a set of filled areas (one area per series), + // with the areas stacked vertically (the base of each area is the top of + // its predecessor, and the base of the first area is the X axis). Since + // the areas do not overlap, each is filled with a different opaque color. + STACKED_AREA = 2; + + // The data is plotted as a set of rectangular boxes (one box per series), + // with the boxes stacked vertically (the base of each box is the top of + // its predecessor, and the base of the first box is the X axis). Since + // the boxes do not overlap, each is filled with a different opaque color. + STACKED_BAR = 3; + + // The data is plotted as a heatmap. The series being plotted must have a + // `DISTRIBUTION` value type. The value of each bucket in the distribution + // is displayed as a color. This type is not currently available in the + // Stackdriver Monitoring application. + HEATMAP = 4; + } + + // Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1; + + // How this data should be plotted on the chart. + PlotType plot_type = 2; + + // A template string for naming `TimeSeries` in the resulting data set. + // This should be a string with interpolations of the form ${label_name}, + // which will resolve to the label's value. + string legend_template = 3; + + // Optional. The lower bound on data point frequency for this data set, implemented by + // specifying the minimum alignment period to use in a time series query + // For example, if the data is published once every 10 minutes, the + // `min_alignment_period` should be at least 10 minutes. It would not + // make sense to fetch and align data at one minute intervals. + google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // A chart axis. + message Axis { + // Types of scales used in axes. + enum Scale { + // Scale is unspecified. The view will default to `LINEAR`. + SCALE_UNSPECIFIED = 0; + + // Linear scale. + LINEAR = 1; + + // Logarithmic scale (base 10). + LOG10 = 2; + } + + // The label of the axis. + string label = 1; + + // The axis scale. By default, a linear scale is used. + Scale scale = 2; + } + + // The data displayed in this chart. + repeated DataSet data_sets = 1; + + // The duration used to display a comparison chart. A comparison chart + // simultaneously shows values from two similar-length time periods + // (e.g., week-over-week metrics). + // The duration must be positive, and it can only be applied to charts with + // data sets of LINE plot type. + google.protobuf.Duration timeshift_duration = 4; + + // Threshold lines drawn horizontally across the chart. + repeated Threshold thresholds = 5; + + // The properties applied to the X axis. + Axis x_axis = 6; + + // The properties applied to the Y axis. + Axis y_axis = 7; + + // Display options for the chart. + ChartOptions chart_options = 8; +} + +// Options to control visual rendering of a chart. +message ChartOptions { + // Chart mode options. + enum Mode { + // Mode is unspecified. The view will default to `COLOR`. + MODE_UNSPECIFIED = 0; + + // The chart distinguishes data series using different color. Line + // colors may get reused when there are many lines in the chart. + COLOR = 1; + + // The chart uses the Stackdriver x-ray mode, in which each + // data set is plotted using the same semi-transparent color. + X_RAY = 2; + + // The chart displays statistics such as average, median, 95th percentile, + // and more. + STATS = 3; + } + + // The chart mode. + Mode mode = 1; +} diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts new file mode 100644 index 00000000000..396233555ab --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -0,0 +1,6981 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|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); + + /** 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 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|null); + + /** FieldDescriptorProto type */ + type?: (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); + } + + /** 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; + + /** FieldDescriptorProto type. */ + public type: 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); + + /** + * 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|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: 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|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** 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|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|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); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an 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 }; + } + } + + /** Namespace monitoring. */ + namespace monitoring { + + /** Namespace dashboard. */ + namespace dashboard { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an Aggregation. */ + interface IAggregation { + + /** Aggregation alignmentPeriod */ + alignmentPeriod?: (google.protobuf.IDuration|null); + + /** Aggregation perSeriesAligner */ + perSeriesAligner?: (google.monitoring.dashboard.v1.Aggregation.Aligner|null); + + /** Aggregation crossSeriesReducer */ + crossSeriesReducer?: (google.monitoring.dashboard.v1.Aggregation.Reducer|null); + + /** Aggregation groupByFields */ + groupByFields?: (string[]|null); + } + + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { + + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IAggregation); + + /** Aggregation alignmentPeriod. */ + public alignmentPeriod?: (google.protobuf.IDuration|null); + + /** Aggregation perSeriesAligner. */ + public perSeriesAligner: google.monitoring.dashboard.v1.Aggregation.Aligner; + + /** Aggregation crossSeriesReducer. */ + public crossSeriesReducer: google.monitoring.dashboard.v1.Aggregation.Reducer; + + /** Aggregation groupByFields. */ + public groupByFields: string[]; + + /** + * Creates a new Aggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregation instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IAggregation): google.monitoring.dashboard.v1.Aggregation; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Aggregation; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Aggregation; + + /** + * Verifies an Aggregation message. + * @param message Plain 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 Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Aggregation; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Aggregation { + + /** Aligner enum. */ + enum Aligner { + ALIGN_NONE = 0, + ALIGN_DELTA = 1, + ALIGN_RATE = 2, + ALIGN_INTERPOLATE = 3, + ALIGN_NEXT_OLDER = 4, + ALIGN_MIN = 10, + ALIGN_MAX = 11, + ALIGN_MEAN = 12, + ALIGN_COUNT = 13, + ALIGN_SUM = 14, + ALIGN_STDDEV = 15, + ALIGN_COUNT_TRUE = 16, + ALIGN_COUNT_FALSE = 24, + ALIGN_FRACTION_TRUE = 17, + ALIGN_PERCENTILE_99 = 18, + ALIGN_PERCENTILE_95 = 19, + ALIGN_PERCENTILE_50 = 20, + ALIGN_PERCENTILE_05 = 21, + ALIGN_PERCENT_CHANGE = 23 + } + + /** Reducer enum. */ + enum Reducer { + REDUCE_NONE = 0, + REDUCE_MEAN = 1, + REDUCE_MIN = 2, + REDUCE_MAX = 3, + REDUCE_SUM = 4, + REDUCE_STDDEV = 5, + REDUCE_COUNT = 6, + REDUCE_COUNT_TRUE = 7, + REDUCE_COUNT_FALSE = 15, + REDUCE_FRACTION_TRUE = 8, + REDUCE_PERCENTILE_99 = 9, + REDUCE_PERCENTILE_95 = 10, + REDUCE_PERCENTILE_50 = 11, + REDUCE_PERCENTILE_05 = 12 + } + } + + /** Properties of a PickTimeSeriesFilter. */ + interface IPickTimeSeriesFilter { + + /** PickTimeSeriesFilter rankingMethod */ + rankingMethod?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null); + + /** PickTimeSeriesFilter numTimeSeries */ + numTimeSeries?: (number|null); + + /** PickTimeSeriesFilter direction */ + direction?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null); + } + + /** Represents a PickTimeSeriesFilter. */ + class PickTimeSeriesFilter implements IPickTimeSeriesFilter { + + /** + * Constructs a new PickTimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter); + + /** PickTimeSeriesFilter rankingMethod. */ + public rankingMethod: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method; + + /** PickTimeSeriesFilter numTimeSeries. */ + public numTimeSeries: number; + + /** PickTimeSeriesFilter direction. */ + public direction: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction; + + /** + * Creates a new PickTimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PickTimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @param message PickTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @param message PickTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Verifies a PickTimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PickTimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. + * @param message PickTimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.PickTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PickTimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PickTimeSeriesFilter { + + /** Method enum. */ + enum Method { + METHOD_UNSPECIFIED = 0, + METHOD_MEAN = 1, + METHOD_MAX = 2, + METHOD_MIN = 3, + METHOD_SUM = 4, + METHOD_LATEST = 5 + } + + /** Direction enum. */ + enum Direction { + DIRECTION_UNSPECIFIED = 0, + TOP = 1, + BOTTOM = 2 + } + } + + /** Properties of a StatisticalTimeSeriesFilter. */ + interface IStatisticalTimeSeriesFilter { + + /** StatisticalTimeSeriesFilter rankingMethod */ + rankingMethod?: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null); + + /** StatisticalTimeSeriesFilter numTimeSeries */ + numTimeSeries?: (number|null); + } + + /** Represents a StatisticalTimeSeriesFilter. */ + class StatisticalTimeSeriesFilter implements IStatisticalTimeSeriesFilter { + + /** + * Constructs a new StatisticalTimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter); + + /** StatisticalTimeSeriesFilter rankingMethod. */ + public rankingMethod: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method; + + /** StatisticalTimeSeriesFilter numTimeSeries. */ + public numTimeSeries: number; + + /** + * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StatisticalTimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @param message StatisticalTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @param message StatisticalTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Verifies a StatisticalTimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatisticalTimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. + * @param message StatisticalTimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatisticalTimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StatisticalTimeSeriesFilter { + + /** Method enum. */ + enum Method { + METHOD_UNSPECIFIED = 0, + METHOD_CLUSTER_OUTLIER = 1 + } + } + + /** Properties of a TimeSeriesQuery. */ + interface ITimeSeriesQuery { + + /** TimeSeriesQuery timeSeriesFilter */ + timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + + /** TimeSeriesQuery timeSeriesFilterRatio */ + timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + + /** TimeSeriesQuery unitOverride */ + unitOverride?: (string|null); + } + + /** Represents a TimeSeriesQuery. */ + class TimeSeriesQuery implements ITimeSeriesQuery { + + /** + * Constructs a new TimeSeriesQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery); + + /** TimeSeriesQuery timeSeriesFilter. */ + public timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + + /** TimeSeriesQuery timeSeriesFilterRatio. */ + public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + + /** TimeSeriesQuery unitOverride. */ + public unitOverride: string; + + /** TimeSeriesQuery source. */ + public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"); + + /** + * Creates a new TimeSeriesQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesQuery instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery): google.monitoring.dashboard.v1.TimeSeriesQuery; + + /** + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesQuery; + + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesQuery; + + /** + * Verifies a TimeSeriesQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesQuery + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesQuery; + + /** + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @param message TimeSeriesQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeSeriesFilter. */ + interface ITimeSeriesFilter { + + /** TimeSeriesFilter filter */ + filter?: (string|null); + + /** TimeSeriesFilter aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + + /** TimeSeriesFilter pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + + /** TimeSeriesFilter statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + } + + /** Represents a TimeSeriesFilter. */ + class TimeSeriesFilter implements ITimeSeriesFilter { + + /** + * Constructs a new TimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter); + + /** TimeSeriesFilter filter. */ + public filter: string; + + /** TimeSeriesFilter aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + + /** TimeSeriesFilter pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + + /** TimeSeriesFilter statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + + /** TimeSeriesFilter outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + + /** + * Creates a new TimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter): google.monitoring.dashboard.v1.TimeSeriesFilter; + + /** + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilter; + + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilter; + + /** + * Verifies a TimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilter; + + /** + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. + * @param message TimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeSeriesFilterRatio. */ + interface ITimeSeriesFilterRatio { + + /** TimeSeriesFilterRatio numerator */ + numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + + /** TimeSeriesFilterRatio denominator */ + denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + + /** TimeSeriesFilterRatio secondaryAggregation */ + secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + + /** TimeSeriesFilterRatio pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + } + + /** Represents a TimeSeriesFilterRatio. */ + class TimeSeriesFilterRatio implements ITimeSeriesFilterRatio { + + /** + * Constructs a new TimeSeriesFilterRatio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio); + + /** TimeSeriesFilterRatio numerator. */ + public numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + + /** TimeSeriesFilterRatio denominator. */ + public denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + + /** TimeSeriesFilterRatio secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + + /** TimeSeriesFilterRatio pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + + /** TimeSeriesFilterRatio outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesFilterRatio instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + + /** + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + + /** + * Verifies a TimeSeriesFilterRatio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesFilterRatio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + + /** + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * @param message TimeSeriesFilterRatio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesFilterRatio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TimeSeriesFilterRatio { + + /** Properties of a RatioPart. */ + interface IRatioPart { + + /** RatioPart filter */ + filter?: (string|null); + + /** RatioPart aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + } + + /** Represents a RatioPart. */ + class RatioPart implements IRatioPart { + + /** + * Constructs a new RatioPart. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart); + + /** RatioPart filter. */ + public filter: string; + + /** RatioPart aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + + /** + * Creates a new RatioPart instance using the specified properties. + * @param [properties] Properties to set + * @returns RatioPart instance + */ + public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + + /** + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RatioPart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + + /** + * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + + /** + * Verifies a RatioPart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RatioPart + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + + /** + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @param message RatioPart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RatioPart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Threshold. */ + interface IThreshold { + + /** Threshold label */ + label?: (string|null); + + /** Threshold value */ + value?: (number|null); + + /** Threshold color */ + color?: (google.monitoring.dashboard.v1.Threshold.Color|null); + + /** Threshold direction */ + direction?: (google.monitoring.dashboard.v1.Threshold.Direction|null); + } + + /** Represents a Threshold. */ + class Threshold implements IThreshold { + + /** + * Constructs a new Threshold. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IThreshold); + + /** Threshold label. */ + public label: string; + + /** Threshold value. */ + public value: number; + + /** Threshold color. */ + public color: google.monitoring.dashboard.v1.Threshold.Color; + + /** Threshold direction. */ + public direction: google.monitoring.dashboard.v1.Threshold.Direction; + + /** + * Creates a new Threshold instance using the specified properties. + * @param [properties] Properties to set + * @returns Threshold instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IThreshold): google.monitoring.dashboard.v1.Threshold; + + /** + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Threshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Threshold; + + /** + * Decodes a Threshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Threshold; + + /** + * Verifies a Threshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Threshold + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Threshold; + + /** + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @param message Threshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Threshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Threshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Threshold { + + /** Color enum. */ + enum Color { + COLOR_UNSPECIFIED = 0, + YELLOW = 4, + RED = 6 + } + + /** Direction enum. */ + enum Direction { + DIRECTION_UNSPECIFIED = 0, + ABOVE = 1, + BELOW = 2 + } + } + + /** SparkChartType enum. */ + enum SparkChartType { + SPARK_CHART_TYPE_UNSPECIFIED = 0, + SPARK_LINE = 1, + SPARK_BAR = 2 + } + + /** Properties of a Text. */ + interface IText { + + /** Text content */ + content?: (string|null); + + /** Text format */ + format?: (google.monitoring.dashboard.v1.Text.Format|null); + } + + /** Represents a Text. */ + class Text implements IText { + + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IText); + + /** Text content. */ + public content: string; + + /** Text format. */ + public format: google.monitoring.dashboard.v1.Text.Format; + + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Text message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; + + /** + * Verifies a Text message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Text + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Text { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + MARKDOWN = 1, + RAW = 2 + } + } + + /** Properties of a Scorecard. */ + interface IScorecard { + + /** Scorecard timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** Scorecard gaugeView */ + gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + + /** Scorecard sparkChartView */ + sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + + /** Scorecard thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + } + + /** Represents a Scorecard. */ + class Scorecard implements IScorecard { + + /** + * Constructs a new Scorecard. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IScorecard); + + /** Scorecard timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** Scorecard gaugeView. */ + public gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + + /** Scorecard sparkChartView. */ + public sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + + /** Scorecard thresholds. */ + public thresholds: google.monitoring.dashboard.v1.IThreshold[]; + + /** Scorecard dataView. */ + public dataView?: ("gaugeView"|"sparkChartView"); + + /** + * Creates a new Scorecard instance using the specified properties. + * @param [properties] Properties to set + * @returns Scorecard instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IScorecard): google.monitoring.dashboard.v1.Scorecard; + + /** + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @param message Scorecard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @param message Scorecard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scorecard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard; + + /** + * Decodes a Scorecard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard; + + /** + * Verifies a Scorecard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scorecard + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard; + + /** + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. + * @param message Scorecard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scorecard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Scorecard { + + /** Properties of a GaugeView. */ + interface IGaugeView { + + /** GaugeView lowerBound */ + lowerBound?: (number|null); + + /** GaugeView upperBound */ + upperBound?: (number|null); + } + + /** Represents a GaugeView. */ + class GaugeView implements IGaugeView { + + /** + * Constructs a new GaugeView. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView); + + /** GaugeView lowerBound. */ + public lowerBound: number; + + /** GaugeView upperBound. */ + public upperBound: number; + + /** + * Creates a new GaugeView instance using the specified properties. + * @param [properties] Properties to set + * @returns GaugeView instance + */ + public static create(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView): google.monitoring.dashboard.v1.Scorecard.GaugeView; + + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @param message GaugeView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @param message GaugeView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.GaugeView; + + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.GaugeView; + + /** + * Verifies a GaugeView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GaugeView + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.GaugeView; + + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @param message GaugeView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard.GaugeView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GaugeView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SparkChartView. */ + interface ISparkChartView { + + /** SparkChartView sparkChartType */ + sparkChartType?: (google.monitoring.dashboard.v1.SparkChartType|null); + + /** SparkChartView minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + } + + /** Represents a SparkChartView. */ + class SparkChartView implements ISparkChartView { + + /** + * Constructs a new SparkChartView. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView); + + /** SparkChartView sparkChartType. */ + public sparkChartType: google.monitoring.dashboard.v1.SparkChartType; + + /** SparkChartView minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** + * Creates a new SparkChartView instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkChartView instance + */ + public static create(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + + /** + * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @param message SparkChartView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @param message SparkChartView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SparkChartView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + + /** + * Decodes a SparkChartView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + + /** + * Verifies a SparkChartView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkChartView + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + + /** + * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. + * @param message SparkChartView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard.SparkChartView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SparkChartView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a XyChart. */ + interface IXyChart { + + /** XyChart dataSets */ + dataSets?: (google.monitoring.dashboard.v1.XyChart.IDataSet[]|null); + + /** XyChart timeshiftDuration */ + timeshiftDuration?: (google.protobuf.IDuration|null); + + /** XyChart thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + + /** XyChart xAxis */ + xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + + /** XyChart yAxis */ + yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + + /** XyChart chartOptions */ + chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + } + + /** Represents a XyChart. */ + class XyChart implements IXyChart { + + /** + * Constructs a new XyChart. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IXyChart); + + /** XyChart dataSets. */ + public dataSets: google.monitoring.dashboard.v1.XyChart.IDataSet[]; + + /** XyChart timeshiftDuration. */ + public timeshiftDuration?: (google.protobuf.IDuration|null); + + /** XyChart thresholds. */ + public thresholds: google.monitoring.dashboard.v1.IThreshold[]; + + /** XyChart xAxis. */ + public xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + + /** XyChart yAxis. */ + public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + + /** XyChart chartOptions. */ + public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + + /** + * Creates a new XyChart instance using the specified properties. + * @param [properties] Properties to set + * @returns XyChart instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IXyChart): google.monitoring.dashboard.v1.XyChart; + + /** + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a XyChart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart; + + /** + * Decodes a XyChart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart; + + /** + * Verifies a XyChart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns XyChart + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart; + + /** + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @param message XyChart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this XyChart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace XyChart { + + /** Properties of a DataSet. */ + interface IDataSet { + + /** DataSet timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** DataSet plotType */ + plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); + + /** DataSet legendTemplate */ + legendTemplate?: (string|null); + + /** DataSet minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + } + + /** Represents a DataSet. */ + class DataSet implements IDataSet { + + /** + * Constructs a new DataSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet); + + /** DataSet timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** DataSet plotType. */ + public plotType: google.monitoring.dashboard.v1.XyChart.DataSet.PlotType; + + /** DataSet legendTemplate. */ + public legendTemplate: string; + + /** DataSet minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** + * Creates a new DataSet instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSet instance + */ + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet): google.monitoring.dashboard.v1.XyChart.DataSet; + + /** + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.DataSet; + + /** + * Decodes a DataSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.DataSet; + + /** + * Verifies a DataSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSet + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.DataSet; + + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @param message DataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart.DataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DataSet { + + /** PlotType enum. */ + enum PlotType { + PLOT_TYPE_UNSPECIFIED = 0, + LINE = 1, + STACKED_AREA = 2, + STACKED_BAR = 3, + HEATMAP = 4 + } + } + + /** Properties of an Axis. */ + interface IAxis { + + /** Axis label */ + label?: (string|null); + + /** Axis scale */ + scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); + } + + /** Represents an Axis. */ + class Axis implements IAxis { + + /** + * Constructs a new Axis. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IAxis); + + /** Axis label. */ + public label: string; + + /** Axis scale. */ + public scale: google.monitoring.dashboard.v1.XyChart.Axis.Scale; + + /** + * Creates a new Axis instance using the specified properties. + * @param [properties] Properties to set + * @returns Axis instance + */ + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IAxis): google.monitoring.dashboard.v1.XyChart.Axis; + + /** + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Axis message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.Axis; + + /** + * Decodes an Axis message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.Axis; + + /** + * Verifies an Axis message. + * @param message Plain 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 Axis message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Axis + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.Axis; + + /** + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @param message Axis + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart.Axis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Axis to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Axis { + + /** Scale enum. */ + enum Scale { + SCALE_UNSPECIFIED = 0, + LINEAR = 1, + LOG10 = 2 + } + } + } + + /** Properties of a ChartOptions. */ + interface IChartOptions { + + /** ChartOptions mode */ + mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|null); + } + + /** Represents a ChartOptions. */ + class ChartOptions implements IChartOptions { + + /** + * Constructs a new ChartOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); + + /** ChartOptions mode. */ + public mode: google.monitoring.dashboard.v1.ChartOptions.Mode; + + /** + * Creates a new ChartOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartOptions instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IChartOptions): google.monitoring.dashboard.v1.ChartOptions; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ChartOptions; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ChartOptions; + + /** + * Verifies a ChartOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartOptions + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ChartOptions; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @param message ChartOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChartOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ChartOptions { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + COLOR = 1, + X_RAY = 2, + STATS = 3 + } + } + + /** Properties of a Widget. */ + interface IWidget { + + /** Widget title */ + title?: (string|null); + + /** Widget xyChart */ + xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + + /** Widget scorecard */ + scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + + /** Widget text */ + text?: (google.monitoring.dashboard.v1.IText|null); + + /** Widget blank */ + blank?: (google.protobuf.IEmpty|null); + } + + /** Represents a Widget. */ + class Widget implements IWidget { + + /** + * Constructs a new Widget. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IWidget); + + /** Widget title. */ + public title: string; + + /** Widget xyChart. */ + public xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + + /** Widget scorecard. */ + public scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + + /** Widget text. */ + public text?: (google.monitoring.dashboard.v1.IText|null); + + /** Widget blank. */ + public blank?: (google.protobuf.IEmpty|null); + + /** Widget content. */ + public content?: ("xyChart"|"scorecard"|"text"|"blank"); + + /** + * Creates a new Widget instance using the specified properties. + * @param [properties] Properties to set + * @returns Widget instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IWidget): google.monitoring.dashboard.v1.Widget; + + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Widget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Widget; + + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Widget; + + /** + * Verifies a Widget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Widget + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Widget; + + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @param message Widget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Widget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Widget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GridLayout. */ + interface IGridLayout { + + /** GridLayout columns */ + columns?: (number|Long|null); + + /** GridLayout widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } + + /** Represents a GridLayout. */ + class GridLayout implements IGridLayout { + + /** + * Constructs a new GridLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); + + /** GridLayout columns. */ + public columns: (number|Long); + + /** GridLayout widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; + + /** + * Creates a new GridLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns GridLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IGridLayout): google.monitoring.dashboard.v1.GridLayout; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GridLayout; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GridLayout; + + /** + * Verifies a GridLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GridLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GridLayout; + + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @param message GridLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.GridLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GridLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RowLayout. */ + interface IRowLayout { + + /** RowLayout rows */ + rows?: (google.monitoring.dashboard.v1.RowLayout.IRow[]|null); + } + + /** Represents a RowLayout. */ + class RowLayout implements IRowLayout { + + /** + * Constructs a new RowLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IRowLayout); + + /** RowLayout rows. */ + public rows: google.monitoring.dashboard.v1.RowLayout.IRow[]; + + /** + * Creates a new RowLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns RowLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IRowLayout): google.monitoring.dashboard.v1.RowLayout; + + /** + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout; + + /** + * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout; + + /** + * Verifies a RowLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout; + + /** + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @param message RowLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.RowLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RowLayout { + + /** Properties of a Row. */ + interface IRow { + + /** Row weight */ + weight?: (number|Long|null); + + /** Row widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); + + /** Row weight. */ + public weight: (number|Long); + + /** Row widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.monitoring.dashboard.v1.RowLayout.IRow): google.monitoring.dashboard.v1.RowLayout.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout.Row; + + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.RowLayout.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ColumnLayout. */ + interface IColumnLayout { + + /** ColumnLayout columns */ + columns?: (google.monitoring.dashboard.v1.ColumnLayout.IColumn[]|null); + } + + /** Represents a ColumnLayout. */ + class ColumnLayout implements IColumnLayout { + + /** + * Constructs a new ColumnLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IColumnLayout); + + /** ColumnLayout columns. */ + public columns: google.monitoring.dashboard.v1.ColumnLayout.IColumn[]; + + /** + * Creates a new ColumnLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IColumnLayout): google.monitoring.dashboard.v1.ColumnLayout; + + /** + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout; + + /** + * Verifies a ColumnLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout; + + /** + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @param message ColumnLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ColumnLayout { + + /** Properties of a Column. */ + interface IColumn { + + /** Column weight */ + weight?: (number|Long|null); + + /** Column widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } + + /** Represents a Column. */ + class Column implements IColumn { + + /** + * Constructs a new Column. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); + + /** Column weight. */ + public weight: (number|Long); + + /** Column widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; + + /** + * Creates a new Column instance using the specified properties. + * @param [properties] Properties to set + * @returns Column instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Column message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Verifies a Column message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Column + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @param message Column + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Column to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Dashboard. */ + interface IDashboard { + + /** Dashboard name */ + name?: (string|null); + + /** Dashboard displayName */ + displayName?: (string|null); + + /** Dashboard etag */ + etag?: (string|null); + + /** Dashboard gridLayout */ + gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + + /** Dashboard rowLayout */ + rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + + /** Dashboard columnLayout */ + columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + } + + /** Represents a Dashboard. */ + class Dashboard implements IDashboard { + + /** + * Constructs a new Dashboard. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDashboard); + + /** Dashboard name. */ + public name: string; + + /** Dashboard displayName. */ + public displayName: string; + + /** Dashboard etag. */ + public etag: string; + + /** Dashboard gridLayout. */ + public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + + /** Dashboard rowLayout. */ + public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + + /** Dashboard columnLayout. */ + public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + + /** Dashboard layout. */ + public layout?: ("gridLayout"|"rowLayout"|"columnLayout"); + + /** + * Creates a new Dashboard instance using the specified properties. + * @param [properties] Properties to set + * @returns Dashboard instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDashboard): google.monitoring.dashboard.v1.Dashboard; + + /** + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dashboard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Dashboard; + + /** + * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Dashboard; + + /** + * Verifies a Dashboard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dashboard + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Dashboard; + + /** + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @param message Dashboard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Dashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dashboard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a DashboardsService */ + class DashboardsService extends $protobuf.rpc.Service { + + /** + * Constructs a new DashboardsService 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 DashboardsService 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): DashboardsService; + + /** + * Calls CreateDashboard. + * @param request CreateDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback): void; + + /** + * Calls CreateDashboard. + * @param request CreateDashboardRequest message or plain object + * @returns Promise + */ + public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest): Promise; + + /** + * Calls ListDashboards. + * @param request ListDashboardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDashboardsResponse + */ + public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest, callback: google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback): void; + + /** + * Calls ListDashboards. + * @param request ListDashboardsRequest message or plain object + * @returns Promise + */ + public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest): Promise; + + /** + * Calls GetDashboard. + * @param request GetDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback): void; + + /** + * Calls GetDashboard. + * @param request GetDashboardRequest message or plain object + * @returns Promise + */ + public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest): Promise; + + /** + * Calls DeleteDashboard. + * @param request DeleteDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback): void; + + /** + * Calls DeleteDashboard. + * @param request DeleteDashboardRequest message or plain object + * @returns Promise + */ + public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest): Promise; + + /** + * Calls UpdateDashboard. + * @param request UpdateDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback): void; + + /** + * Calls UpdateDashboard. + * @param request UpdateDashboardRequest message or plain object + * @returns Promise + */ + public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest): Promise; + } + + namespace DashboardsService { + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type CreateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * @param error Error, if any + * @param [response] ListDashboardsResponse + */ + type ListDashboardsCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.ListDashboardsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type GetDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDashboardCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type UpdateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + } + + /** Properties of a CreateDashboardRequest. */ + interface ICreateDashboardRequest { + + /** CreateDashboardRequest parent */ + parent?: (string|null); + + /** CreateDashboardRequest dashboard */ + dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + } + + /** Represents a CreateDashboardRequest. */ + class CreateDashboardRequest implements ICreateDashboardRequest { + + /** + * Constructs a new CreateDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest); + + /** CreateDashboardRequest parent. */ + public parent: string; + + /** CreateDashboardRequest dashboard. */ + public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + + /** + * Creates a new CreateDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest): google.monitoring.dashboard.v1.CreateDashboardRequest; + + /** + * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @param message CreateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @param message CreateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.CreateDashboardRequest; + + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.CreateDashboardRequest; + + /** + * Verifies a CreateDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.CreateDashboardRequest; + + /** + * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. + * @param message CreateDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.CreateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDashboardsRequest. */ + interface IListDashboardsRequest { + + /** ListDashboardsRequest parent */ + parent?: (string|null); + + /** ListDashboardsRequest pageSize */ + pageSize?: (number|null); + + /** ListDashboardsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDashboardsRequest. */ + class ListDashboardsRequest implements IListDashboardsRequest { + + /** + * Constructs a new ListDashboardsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest); + + /** ListDashboardsRequest parent. */ + public parent: string; + + /** ListDashboardsRequest pageSize. */ + public pageSize: number; + + /** ListDashboardsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDashboardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDashboardsRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest): google.monitoring.dashboard.v1.ListDashboardsRequest; + + /** + * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @param message ListDashboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @param message ListDashboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsRequest; + + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsRequest; + + /** + * Verifies a ListDashboardsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDashboardsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsRequest; + + /** + * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. + * @param message ListDashboardsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDashboardsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListDashboardsResponse. */ + interface IListDashboardsResponse { + + /** ListDashboardsResponse dashboards */ + dashboards?: (google.monitoring.dashboard.v1.IDashboard[]|null); + + /** ListDashboardsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDashboardsResponse. */ + class ListDashboardsResponse implements IListDashboardsResponse { + + /** + * Constructs a new ListDashboardsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse); + + /** ListDashboardsResponse dashboards. */ + public dashboards: google.monitoring.dashboard.v1.IDashboard[]; + + /** ListDashboardsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDashboardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDashboardsResponse instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse): google.monitoring.dashboard.v1.ListDashboardsResponse; + + /** + * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @param message ListDashboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @param message ListDashboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsResponse; + + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsResponse; + + /** + * Verifies a ListDashboardsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDashboardsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsResponse; + + /** + * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. + * @param message ListDashboardsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDashboardsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetDashboardRequest. */ + interface IGetDashboardRequest { + + /** GetDashboardRequest name */ + name?: (string|null); + } + + /** Represents a GetDashboardRequest. */ + class GetDashboardRequest implements IGetDashboardRequest { + + /** + * Constructs a new GetDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest); + + /** GetDashboardRequest name. */ + public name: string; + + /** + * Creates a new GetDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest): google.monitoring.dashboard.v1.GetDashboardRequest; + + /** + * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @param message GetDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @param message GetDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GetDashboardRequest; + + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GetDashboardRequest; + + /** + * Verifies a GetDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GetDashboardRequest; + + /** + * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * @param message GetDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.GetDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteDashboardRequest. */ + interface IDeleteDashboardRequest { + + /** DeleteDashboardRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDashboardRequest. */ + class DeleteDashboardRequest implements IDeleteDashboardRequest { + + /** + * Constructs a new DeleteDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest); + + /** DeleteDashboardRequest name. */ + public name: string; + + /** + * Creates a new DeleteDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest): google.monitoring.dashboard.v1.DeleteDashboardRequest; + + /** + * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @param message DeleteDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @param message DeleteDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.DeleteDashboardRequest; + + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.DeleteDashboardRequest; + + /** + * Verifies a DeleteDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.DeleteDashboardRequest; + + /** + * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. + * @param message DeleteDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.DeleteDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateDashboardRequest. */ + interface IUpdateDashboardRequest { + + /** UpdateDashboardRequest dashboard */ + dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + } + + /** Represents an UpdateDashboardRequest. */ + class UpdateDashboardRequest implements IUpdateDashboardRequest { + + /** + * Constructs a new UpdateDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest); + + /** UpdateDashboardRequest dashboard. */ + public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + + /** + * Creates a new UpdateDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest): google.monitoring.dashboard.v1.UpdateDashboardRequest; + + /** + * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @param message UpdateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @param message UpdateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.UpdateDashboardRequest; + + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.UpdateDashboardRequest; + + /** + * Verifies an UpdateDashboardRequest message. + * @param message Plain 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 UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.UpdateDashboardRequest; + + /** + * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. + * @param message UpdateDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.UpdateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js new file mode 100644 index 00000000000..32fba31c057 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -0,0 +1,18138 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + 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 && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("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.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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("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 && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("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 && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("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 + */ + + /** + * 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; + + /** + * 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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + 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; + 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; + } + 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); + } + 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 = ""; + } + 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; + 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 {string} + * @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 {string} + * @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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 42: + message.phpGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 39: + message.swiftPrefix = reader.string(); + break; + case 40: + message.phpClassPrefix = reader.string(); + break; + case 41: + message.phpNamespace = reader.string(); + break; + case 44: + message.phpMetadataNamespace = reader.string(); + break; + case 45: + message.rubyPackage = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @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 {string} + * @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 && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @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 && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("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 && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("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 && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("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.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; + })(); + + return protobuf; + })(); + + google.monitoring = (function() { + + /** + * Namespace monitoring. + * @memberof google + * @namespace + */ + var monitoring = {}; + + monitoring.dashboard = (function() { + + /** + * Namespace dashboard. + * @memberof google.monitoring + * @namespace + */ + var dashboard = {}; + + dashboard.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.monitoring.dashboard + * @namespace + */ + var v1 = {}; + + v1.Aggregation = (function() { + + /** + * Properties of an Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @interface IAggregation + * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod + * @property {google.monitoring.dashboard.v1.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner + * @property {google.monitoring.dashboard.v1.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer + * @property {Array.|null} [groupByFields] Aggregation groupByFields + */ + + /** + * Constructs a new Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + this.groupByFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aggregation alignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.alignmentPeriod = null; + + /** + * Aggregation perSeriesAligner. + * @member {google.monitoring.dashboard.v1.Aggregation.Aligner} perSeriesAligner + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.perSeriesAligner = 0; + + /** + * Aggregation crossSeriesReducer. + * @member {google.monitoring.dashboard.v1.Aggregation.Reducer} crossSeriesReducer + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.crossSeriesReducer = 0; + + /** + * Aggregation groupByFields. + * @member {Array.} groupByFields + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.groupByFields = $util.emptyArray; + + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); + if (message.groupByFields != null && message.groupByFields.length) + for (var i = 0; i < message.groupByFields.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + return writer; + }; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.perSeriesAligner = reader.int32(); + break; + case 4: + message.crossSeriesReducer = reader.int32(); + break; + case 5: + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); + if (error) + return "alignmentPeriod." + error; + } + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + switch (message.perSeriesAligner) { + default: + return "perSeriesAligner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 24: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + break; + } + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + switch (message.crossSeriesReducer) { + default: + return "crossSeriesReducer: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { + if (!Array.isArray(message.groupByFields)) + return "groupByFields: array expected"; + for (var i = 0; i < message.groupByFields.length; ++i) + if (!$util.isString(message.groupByFields[i])) + return "groupByFields: string[] expected"; + } + return null; + }; + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Aggregation) + return object; + var message = new $root.google.monitoring.dashboard.v1.Aggregation(); + if (object.alignmentPeriod != null) { + if (typeof object.alignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.alignmentPeriod: object expected"); + message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + } + switch (object.perSeriesAligner) { + case "ALIGN_NONE": + case 0: + message.perSeriesAligner = 0; + break; + case "ALIGN_DELTA": + case 1: + message.perSeriesAligner = 1; + break; + case "ALIGN_RATE": + case 2: + message.perSeriesAligner = 2; + break; + case "ALIGN_INTERPOLATE": + case 3: + message.perSeriesAligner = 3; + break; + case "ALIGN_NEXT_OLDER": + case 4: + message.perSeriesAligner = 4; + break; + case "ALIGN_MIN": + case 10: + message.perSeriesAligner = 10; + break; + case "ALIGN_MAX": + case 11: + message.perSeriesAligner = 11; + break; + case "ALIGN_MEAN": + case 12: + message.perSeriesAligner = 12; + break; + case "ALIGN_COUNT": + case 13: + message.perSeriesAligner = 13; + break; + case "ALIGN_SUM": + case 14: + message.perSeriesAligner = 14; + break; + case "ALIGN_STDDEV": + case 15: + message.perSeriesAligner = 15; + break; + case "ALIGN_COUNT_TRUE": + case 16: + message.perSeriesAligner = 16; + break; + case "ALIGN_COUNT_FALSE": + case 24: + message.perSeriesAligner = 24; + break; + case "ALIGN_FRACTION_TRUE": + case 17: + message.perSeriesAligner = 17; + break; + case "ALIGN_PERCENTILE_99": + case 18: + message.perSeriesAligner = 18; + break; + case "ALIGN_PERCENTILE_95": + case 19: + message.perSeriesAligner = 19; + break; + case "ALIGN_PERCENTILE_50": + case 20: + message.perSeriesAligner = 20; + break; + case "ALIGN_PERCENTILE_05": + case 21: + message.perSeriesAligner = 21; + break; + case "ALIGN_PERCENT_CHANGE": + case 23: + message.perSeriesAligner = 23; + break; + } + switch (object.crossSeriesReducer) { + case "REDUCE_NONE": + case 0: + message.crossSeriesReducer = 0; + break; + case "REDUCE_MEAN": + case 1: + message.crossSeriesReducer = 1; + break; + case "REDUCE_MIN": + case 2: + message.crossSeriesReducer = 2; + break; + case "REDUCE_MAX": + case 3: + message.crossSeriesReducer = 3; + break; + case "REDUCE_SUM": + case 4: + message.crossSeriesReducer = 4; + break; + case "REDUCE_STDDEV": + case 5: + message.crossSeriesReducer = 5; + break; + case "REDUCE_COUNT": + case 6: + message.crossSeriesReducer = 6; + break; + case "REDUCE_COUNT_TRUE": + case 7: + message.crossSeriesReducer = 7; + break; + case "REDUCE_COUNT_FALSE": + case 15: + message.crossSeriesReducer = 15; + break; + case "REDUCE_FRACTION_TRUE": + case 8: + message.crossSeriesReducer = 8; + break; + case "REDUCE_PERCENTILE_99": + case 9: + message.crossSeriesReducer = 9; + break; + case "REDUCE_PERCENTILE_95": + case 10: + message.crossSeriesReducer = 10; + break; + case "REDUCE_PERCENTILE_50": + case 11: + message.crossSeriesReducer = 11; + break; + case "REDUCE_PERCENTILE_05": + case 12: + message.crossSeriesReducer = 12; + break; + } + if (object.groupByFields) { + if (!Array.isArray(object.groupByFields)) + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.groupByFields: array expected"); + message.groupByFields = []; + for (var i = 0; i < object.groupByFields.length; ++i) + message.groupByFields[i] = String(object.groupByFields[i]); + } + return message; + }; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupByFields = []; + if (options.defaults) { + object.alignmentPeriod = null; + object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; + object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + } + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + if (message.groupByFields && message.groupByFields.length) { + object.groupByFields = []; + for (var j = 0; j < message.groupByFields.length; ++j) + object.groupByFields[j] = message.groupByFields[j]; + } + return object; + }; + + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Aligner enum. + * @name google.monitoring.dashboard.v1.Aggregation.Aligner + * @enum {string} + * @property {number} ALIGN_NONE=0 ALIGN_NONE value + * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value + * @property {number} ALIGN_RATE=2 ALIGN_RATE value + * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value + * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value + * @property {number} ALIGN_MIN=10 ALIGN_MIN value + * @property {number} ALIGN_MAX=11 ALIGN_MAX value + * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value + * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value + * @property {number} ALIGN_SUM=14 ALIGN_SUM value + * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value + * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value + * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value + * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value + * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value + * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value + * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value + * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value + * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value + */ + Aggregation.Aligner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALIGN_NONE"] = 0; + values[valuesById[1] = "ALIGN_DELTA"] = 1; + values[valuesById[2] = "ALIGN_RATE"] = 2; + values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; + values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; + values[valuesById[10] = "ALIGN_MIN"] = 10; + values[valuesById[11] = "ALIGN_MAX"] = 11; + values[valuesById[12] = "ALIGN_MEAN"] = 12; + values[valuesById[13] = "ALIGN_COUNT"] = 13; + values[valuesById[14] = "ALIGN_SUM"] = 14; + values[valuesById[15] = "ALIGN_STDDEV"] = 15; + values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; + values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; + values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; + values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; + values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; + values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; + values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; + values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; + return values; + })(); + + /** + * Reducer enum. + * @name google.monitoring.dashboard.v1.Aggregation.Reducer + * @enum {string} + * @property {number} REDUCE_NONE=0 REDUCE_NONE value + * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value + * @property {number} REDUCE_MIN=2 REDUCE_MIN value + * @property {number} REDUCE_MAX=3 REDUCE_MAX value + * @property {number} REDUCE_SUM=4 REDUCE_SUM value + * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value + * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value + * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value + * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value + * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value + * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value + * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value + * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value + * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value + */ + Aggregation.Reducer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDUCE_NONE"] = 0; + values[valuesById[1] = "REDUCE_MEAN"] = 1; + values[valuesById[2] = "REDUCE_MIN"] = 2; + values[valuesById[3] = "REDUCE_MAX"] = 3; + values[valuesById[4] = "REDUCE_SUM"] = 4; + values[valuesById[5] = "REDUCE_STDDEV"] = 5; + values[valuesById[6] = "REDUCE_COUNT"] = 6; + values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; + values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; + values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; + values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; + values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; + values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; + values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; + return values; + })(); + + return Aggregation; + })(); + + v1.PickTimeSeriesFilter = (function() { + + /** + * Properties of a PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IPickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null} [rankingMethod] PickTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] PickTimeSeriesFilter numTimeSeries + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null} [direction] PickTimeSeriesFilter direction + */ + + /** + * Constructs a new PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a PickTimeSeriesFilter. + * @implements IPickTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + */ + function PickTimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.rankingMethod = 0; + + /** + * PickTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.numTimeSeries = 0; + + /** + * PickTimeSeriesFilter direction. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction} direction + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.direction = 0; + + /** + * Creates a new PickTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter instance + */ + PickTimeSeriesFilter.create = function create(properties) { + return new PickTimeSeriesFilter(properties); + }; + + /** + * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + if (message.direction != null && message.hasOwnProperty("direction")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); + return writer; + }; + + /** + * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + case 3: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + */ + PickTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_MEAN": + case 1: + message.rankingMethod = 1; + break; + case "METHOD_MAX": + case 2: + message.rankingMethod = 2; + break; + case "METHOD_MIN": + case 3: + message.rankingMethod = 3; + break; + case "METHOD_SUM": + case 4: + message.rankingMethod = 4; + break; + case "METHOD_LATEST": + case 5: + message.rankingMethod = 5; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "TOP": + case 1: + message.direction = 1; + break; + case "BOTTOM": + case 2: + message.direction = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.PickTimeSeriesFilter} message PickTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction[message.direction] : message.direction; + return object; + }; + + /** + * Converts this PickTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + PickTimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Method enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method + * @enum {string} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_MEAN=1 METHOD_MEAN value + * @property {number} METHOD_MAX=2 METHOD_MAX value + * @property {number} METHOD_MIN=3 METHOD_MIN value + * @property {number} METHOD_SUM=4 METHOD_SUM value + * @property {number} METHOD_LATEST=5 METHOD_LATEST value + */ + PickTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_MEAN"] = 1; + values[valuesById[2] = "METHOD_MAX"] = 2; + values[valuesById[3] = "METHOD_MIN"] = 3; + values[valuesById[4] = "METHOD_SUM"] = 4; + values[valuesById[5] = "METHOD_LATEST"] = 5; + return values; + })(); + + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction + * @enum {string} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} BOTTOM=2 BOTTOM value + */ + PickTimeSeriesFilter.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "BOTTOM"] = 2; + return values; + })(); + + return PickTimeSeriesFilter; + })(); + + v1.StatisticalTimeSeriesFilter = (function() { + + /** + * Properties of a StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IStatisticalTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null} [rankingMethod] StatisticalTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] StatisticalTimeSeriesFilter numTimeSeries + */ + + /** + * Constructs a new StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a StatisticalTimeSeriesFilter. + * @implements IStatisticalTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + */ + function StatisticalTimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatisticalTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.rankingMethod = 0; + + /** + * StatisticalTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.numTimeSeries = 0; + + /** + * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter instance + */ + StatisticalTimeSeriesFilter.create = function create(properties) { + return new StatisticalTimeSeriesFilter(properties); + }; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + return writer; + }; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatisticalTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticalTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer expected"; + return null; + }; + + /** + * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + */ + StatisticalTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_CLUSTER_OUTLIER": + case 1: + message.rankingMethod = 1; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + return message; + }; + + /** + * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticalTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + return object; + }; + + /** + * Converts this StatisticalTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + StatisticalTimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Method enum. + * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method + * @enum {string} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value + */ + StatisticalTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_CLUSTER_OUTLIER"] = 1; + return values; + })(); + + return StatisticalTimeSeriesFilter; + })(); + + v1.TimeSeriesQuery = (function() { + + /** + * Properties of a TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesQuery + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio + * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride + */ + + /** + * Constructs a new TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesQuery. + * @implements ITimeSeriesQuery + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + */ + function TimeSeriesQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesQuery timeSeriesFilter. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilter = null; + + /** + * TimeSeriesQuery timeSeriesFilterRatio. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; + + /** + * TimeSeriesQuery unitOverride. + * @member {string} unitOverride + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.unitOverride = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesQuery source. + * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|undefined} source + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + Object.defineProperty(TimeSeriesQuery.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesQuery instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance + */ + TimeSeriesQuery.create = function create(properties) { + return new TimeSeriesQuery(properties); + }; + + /** + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); + return writer; + }; + + /** + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 2: + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); + break; + case 5: + message.unitOverride = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesQuery message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); + if (error) + return "timeSeriesFilter." + error; + } + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); + if (error) + return "timeSeriesFilterRatio." + error; + } + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + if (!$util.isString(message.unitOverride)) + return "unitOverride: string expected"; + return null; + }; + + /** + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + */ + TimeSeriesQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + if (object.timeSeriesFilter != null) { + if (typeof object.timeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); + } + if (object.timeSeriesFilterRatio != null) { + if (typeof object.timeSeriesFilterRatio !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); + } + if (object.unitOverride != null) + message.unitOverride = String(object.unitOverride); + return message; + }; + + /** + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unitOverride = ""; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); + if (options.oneofs) + object.source = "timeSeriesFilter"; + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); + if (options.oneofs) + object.source = "timeSeriesFilterRatio"; + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + object.unitOverride = message.unitOverride; + return object; + }; + + /** + * Converts this TimeSeriesQuery to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSeriesQuery; + })(); + + v1.TimeSeriesFilter = (function() { + + /** + * Properties of a TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesFilter + * @property {string|null} [filter] TimeSeriesFilter filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter + */ + + /** + * Constructs a new TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesFilter. + * @implements ITimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + */ + function TimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesFilter filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.filter = ""; + + /** + * TimeSeriesFilter aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.aggregation = null; + + /** + * TimeSeriesFilter pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; + + /** + * TimeSeriesFilter statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesFilter outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance + */ + TimeSeriesFilter.create = function create(properties) { + return new TimeSeriesFilter(properties); + }; + + /** + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + */ + TimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + } + return message; + }; + + /** + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } + return object; + }; + + /** + * Converts this TimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSeriesFilter; + })(); + + v1.TimeSeriesFilterRatio = (function() { + + /** + * Properties of a TimeSeriesFilterRatio. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesFilterRatio + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter + */ + + /** + * Constructs a new TimeSeriesFilterRatio. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesFilterRatio. + * @implements ITimeSeriesFilterRatio + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + */ + function TimeSeriesFilterRatio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesFilterRatio numerator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.numerator = null; + + /** + * TimeSeriesFilterRatio denominator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.denominator = null; + + /** + * TimeSeriesFilterRatio secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.secondaryAggregation = null; + + /** + * TimeSeriesFilterRatio pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; + + /** + * TimeSeriesFilterRatio statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesFilterRatio outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance + */ + TimeSeriesFilterRatio.create = function create(properties) { + return new TimeSeriesFilterRatio(properties); + }; + + /** + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilterRatio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numerator != null && message.hasOwnProperty("numerator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denominator != null && message.hasOwnProperty("denominator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilterRatio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 2: + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesFilterRatio message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesFilterRatio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.numerator != null && message.hasOwnProperty("numerator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); + if (error) + return "numerator." + error; + } + if (message.denominator != null && message.hasOwnProperty("denominator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); + if (error) + return "denominator." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + */ + TimeSeriesFilterRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + if (object.numerator != null) { + if (typeof object.numerator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); + } + if (object.denominator != null) { + if (typeof object.denominator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + } + return message; + }; + + /** + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesFilterRatio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numerator = null; + object.denominator = null; + object.secondaryAggregation = null; + } + if (message.numerator != null && message.hasOwnProperty("numerator")) + object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); + if (message.denominator != null && message.hasOwnProperty("denominator")) + object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } + return object; + }; + + /** + * Converts this TimeSeriesFilterRatio to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TimeSeriesFilterRatio.RatioPart = (function() { + + /** + * Properties of a RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @interface IRatioPart + * @property {string|null} [filter] RatioPart filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation + */ + + /** + * Constructs a new RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @classdesc Represents a RatioPart. + * @implements IRatioPart + * @constructor + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + */ + function RatioPart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RatioPart filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.filter = ""; + + /** + * RatioPart aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.aggregation = null; + + /** + * Creates a new RatioPart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance + */ + RatioPart.create = function create(properties) { + return new RatioPart(properties); + }; + + /** + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RatioPart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RatioPart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RatioPart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + return null; + }; + + /** + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + */ + RatioPart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + return message; + }; + + /** + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RatioPart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + return object; + }; + + /** + * Converts this RatioPart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + * @returns {Object.} JSON object + */ + RatioPart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RatioPart; + })(); + + return TimeSeriesFilterRatio; + })(); + + v1.Threshold = (function() { + + /** + * Properties of a Threshold. + * @memberof google.monitoring.dashboard.v1 + * @interface IThreshold + * @property {string|null} [label] Threshold label + * @property {number|null} [value] Threshold value + * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color + * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + */ + + /** + * Constructs a new Threshold. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Threshold. + * @implements IThreshold + * @constructor + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + */ + function Threshold(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Threshold label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.label = ""; + + /** + * Threshold value. + * @member {number} value + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.value = 0; + + /** + * Threshold color. + * @member {google.monitoring.dashboard.v1.Threshold.Color} color + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.color = 0; + + /** + * Threshold direction. + * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.direction = 0; + + /** + * Creates a new Threshold instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance + */ + Threshold.create = function create(properties) { + return new Threshold(properties); + }; + + /** + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Threshold.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); + if (message.color != null && message.hasOwnProperty("color")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); + if (message.direction != null && message.hasOwnProperty("direction")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + return writer; + }; + + /** + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Threshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Threshold message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Threshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.label = reader.string(); + break; + case 2: + message.value = reader.double(); + break; + case 3: + message.color = reader.int32(); + break; + case 4: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Threshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Threshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Threshold message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Threshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.color != null && message.hasOwnProperty("color")) + switch (message.color) { + default: + return "color: enum value expected"; + case 0: + case 4: + case 6: + break; + } + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + */ + Threshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) + return object; + var message = new $root.google.monitoring.dashboard.v1.Threshold(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = Number(object.value); + switch (object.color) { + case "COLOR_UNSPECIFIED": + case 0: + message.color = 0; + break; + case "YELLOW": + case 4: + message.color = 4; + break; + case "RED": + case 6: + message.color = 6; + break; + } + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "ABOVE": + case 1: + message.direction = 1; + break; + case "BELOW": + case 2: + message.direction = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.Threshold} message Threshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Threshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.value = 0; + object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.color != null && message.hasOwnProperty("color")) + object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + return object; + }; + + /** + * Converts this Threshold to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + * @returns {Object.} JSON object + */ + Threshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Color enum. + * @name google.monitoring.dashboard.v1.Threshold.Color + * @enum {string} + * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value + * @property {number} YELLOW=4 YELLOW value + * @property {number} RED=6 RED value + */ + Threshold.Color = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; + values[valuesById[4] = "YELLOW"] = 4; + values[valuesById[6] = "RED"] = 6; + return values; + })(); + + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.Threshold.Direction + * @enum {string} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} ABOVE=1 ABOVE value + * @property {number} BELOW=2 BELOW value + */ + Threshold.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ABOVE"] = 1; + values[valuesById[2] = "BELOW"] = 2; + return values; + })(); + + return Threshold; + })(); + + /** + * SparkChartType enum. + * @name google.monitoring.dashboard.v1.SparkChartType + * @enum {string} + * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value + * @property {number} SPARK_LINE=1 SPARK_LINE value + * @property {number} SPARK_BAR=2 SPARK_BAR value + */ + v1.SparkChartType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_LINE"] = 1; + values[valuesById[2] = "SPARK_BAR"] = 2; + return values; + })(); + + v1.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.monitoring.dashboard.v1 + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + */ + + /** + * Constructs a new Text. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.content = ""; + + /** + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.format = 0; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.format = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Text message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Text) + return object; + var message = new $root.google.monitoring.dashboard.v1.Text(); + if (object.content != null) + message.content = String(object.content); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "MARKDOWN": + case 1: + message.format = 1; + break; + case "RAW": + case 2: + message.format = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Format enum. + * @name google.monitoring.dashboard.v1.Text.Format + * @enum {string} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} MARKDOWN=1 MARKDOWN value + * @property {number} RAW=2 RAW value + */ + Text.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MARKDOWN"] = 1; + values[valuesById[2] = "RAW"] = 2; + return values; + })(); + + return Text; + })(); + + v1.Scorecard = (function() { + + /** + * Properties of a Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @interface IScorecard + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery + * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView + * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView + * @property {Array.|null} [thresholds] Scorecard thresholds + */ + + /** + * Constructs a new Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Scorecard. + * @implements IScorecard + * @constructor + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + */ + function Scorecard(properties) { + this.thresholds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scorecard timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.timeSeriesQuery = null; + + /** + * Scorecard gaugeView. + * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.gaugeView = null; + + /** + * Scorecard sparkChartView. + * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.sparkChartView = null; + + /** + * Scorecard thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.thresholds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scorecard dataView. + * @member {"gaugeView"|"sparkChartView"|undefined} dataView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Object.defineProperty(Scorecard.prototype, "dataView", { + get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scorecard instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance + */ + Scorecard.create = function create(properties) { + return new Scorecard(properties); + }; + + /** + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scorecard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) + $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) + $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scorecard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scorecard message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scorecard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 4: + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); + break; + case 5: + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scorecard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scorecard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scorecard message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scorecard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); + if (error) + return "gaugeView." + error; + } + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + if (properties.dataView === 1) + return "dataView: multiple values"; + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); + if (error) + return "sparkChartView." + error; + } + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; + } + } + return null; + }; + + /** + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + */ + Scorecard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + if (object.gaugeView != null) { + if (typeof object.gaugeView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); + } + if (object.sparkChartView != null) { + if (typeof object.sparkChartView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scorecard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.thresholds = []; + if (options.defaults) + object.timeSeriesQuery = null; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); + if (options.oneofs) + object.dataView = "gaugeView"; + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); + if (options.oneofs) + object.dataView = "sparkChartView"; + } + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + } + return object; + }; + + /** + * Converts this Scorecard to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + * @returns {Object.} JSON object + */ + Scorecard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Scorecard.GaugeView = (function() { + + /** + * Properties of a GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface IGaugeView + * @property {number|null} [lowerBound] GaugeView lowerBound + * @property {number|null} [upperBound] GaugeView upperBound + */ + + /** + * Constructs a new GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a GaugeView. + * @implements IGaugeView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + */ + function GaugeView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GaugeView lowerBound. + * @member {number} lowerBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.lowerBound = 0; + + /** + * GaugeView upperBound. + * @member {number} upperBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.upperBound = 0; + + /** + * Creates a new GaugeView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance + */ + GaugeView.create = function create(properties) { + return new GaugeView(properties); + }; + + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); + return writer; + }; + + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lowerBound = reader.double(); + break; + case 2: + message.upperBound = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GaugeView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GaugeView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; + + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + */ + GaugeView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; + + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GaugeView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; + + /** + * Converts this GaugeView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + * @returns {Object.} JSON object + */ + GaugeView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GaugeView; + })(); + + Scorecard.SparkChartView = (function() { + + /** + * Properties of a SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface ISparkChartView + * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod + */ + + /** + * Constructs a new SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a SparkChartView. + * @implements ISparkChartView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + */ + function SparkChartView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SparkChartView sparkChartType. + * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.sparkChartType = 0; + + /** + * SparkChartView minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.minAlignmentPeriod = null; + + /** + * Creates a new SparkChartView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance + */ + SparkChartView.create = function create(properties) { + return new SparkChartView(properties); + }; + + /** + * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkChartView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sparkChartType = reader.int32(); + break; + case 2: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkChartView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkChartView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkChartView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + switch (message.sparkChartType) { + default: + return "sparkChartType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; + + /** + * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + */ + SparkChartView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + switch (object.sparkChartType) { + case "SPARK_CHART_TYPE_UNSPECIFIED": + case 0: + message.sparkChartType = 0; + break; + case "SPARK_LINE": + case 1: + message.sparkChartType = 1; + break; + case "SPARK_BAR": + case 2: + message.sparkChartType = 2; + break; + } + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + return message; + }; + + /** + * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkChartView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; + object.minAlignmentPeriod = null; + } + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; + + /** + * Converts this SparkChartView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + * @returns {Object.} JSON object + */ + SparkChartView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SparkChartView; + })(); + + return Scorecard; + })(); + + v1.XyChart = (function() { + + /** + * Properties of a XyChart. + * @memberof google.monitoring.dashboard.v1 + * @interface IXyChart + * @property {Array.|null} [dataSets] XyChart dataSets + * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration + * @property {Array.|null} [thresholds] XyChart thresholds + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions + */ + + /** + * Constructs a new XyChart. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a XyChart. + * @implements IXyChart + * @constructor + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + */ + function XyChart(properties) { + this.dataSets = []; + this.thresholds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * XyChart dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.dataSets = $util.emptyArray; + + /** + * XyChart timeshiftDuration. + * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.timeshiftDuration = null; + + /** + * XyChart thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.thresholds = $util.emptyArray; + + /** + * XyChart xAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.xAxis = null; + + /** + * XyChart yAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.yAxis = null; + + /** + * XyChart chartOptions. + * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.chartOptions = null; + + /** + * Creates a new XyChart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance + */ + XyChart.create = function create(properties) { + return new XyChart(properties); + }; + + /** + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + XyChart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + XyChart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a XyChart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + XyChart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); + break; + case 4: + message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + case 6: + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 7: + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 8: + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a XyChart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + XyChart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a XyChart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + XyChart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); + if (error) + return "dataSets." + error; + } + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { + var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); + if (error) + return "timeshiftDuration." + error; + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; + } + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); + if (error) + return "xAxis." + error; + } + if (message.yAxis != null && message.hasOwnProperty("yAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); + if (error) + return "yAxis." + error; + } + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { + var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); + if (error) + return "chartOptions." + error; + } + return null; + }; + + /** + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + */ + XyChart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); + } + } + if (object.timeshiftDuration != null) { + if (typeof object.timeshiftDuration !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); + message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } + } + if (object.xAxis != null) { + if (typeof object.xAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); + } + if (object.yAxis != null) { + if (typeof object.yAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); + } + if (object.chartOptions != null) { + if (typeof object.chartOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); + } + return message; + }; + + /** + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.XyChart} message XyChart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + XyChart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSets = []; + object.thresholds = []; + } + if (options.defaults) { + object.timeshiftDuration = null; + object.xAxis = null; + object.yAxis = null; + object.chartOptions = null; + } + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + return object; + }; + + /** + * Converts this XyChart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + * @returns {Object.} JSON object + */ + XyChart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + XyChart.DataSet = (function() { + + /** + * Properties of a DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType + * @property {string|null} [legendTemplate] DataSet legendTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod + */ + + /** + * Constructs a new DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents a DataSet. + * @implements IDataSet + * @constructor + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + */ + function DataSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.timeSeriesQuery = null; + + /** + * DataSet plotType. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.plotType = 0; + + /** + * DataSet legendTemplate. + * @member {string} legendTemplate + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.legendTemplate = ""; + + /** + * DataSet minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.minAlignmentPeriod = null; + + /** + * Creates a new DataSet instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance + */ + DataSet.create = function create(properties) { + return new DataSet(properties); + }; + + /** + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.plotType != null && message.hasOwnProperty("plotType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSet message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 2: + message.plotType = reader.int32(); + break; + case 3: + message.legendTemplate = reader.string(); + break; + case 4: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSet message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.plotType != null && message.hasOwnProperty("plotType")) + switch (message.plotType) { + default: + return "plotType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + if (!$util.isString(message.legendTemplate)) + return "legendTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; + + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + */ + DataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + switch (object.plotType) { + case "PLOT_TYPE_UNSPECIFIED": + case 0: + message.plotType = 0; + break; + case "LINE": + case 1: + message.plotType = 1; + break; + case "STACKED_AREA": + case 2: + message.plotType = 2; + break; + case "STACKED_BAR": + case 3: + message.plotType = 3; + break; + case "HEATMAP": + case 4: + message.plotType = 4; + break; + } + if (object.legendTemplate != null) + message.legendTemplate = String(object.legendTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + return message; + }; + + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; + object.legendTemplate = ""; + object.minAlignmentPeriod = null; + } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.plotType != null && message.hasOwnProperty("plotType")) + object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + object.legendTemplate = message.legendTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; + + /** + * Converts this DataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + * @returns {Object.} JSON object + */ + DataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PlotType enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType + * @enum {string} + * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value + * @property {number} LINE=1 LINE value + * @property {number} STACKED_AREA=2 STACKED_AREA value + * @property {number} STACKED_BAR=3 STACKED_BAR value + * @property {number} HEATMAP=4 HEATMAP value + */ + DataSet.PlotType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE"] = 1; + values[valuesById[2] = "STACKED_AREA"] = 2; + values[valuesById[3] = "STACKED_BAR"] = 3; + values[valuesById[4] = "HEATMAP"] = 4; + return values; + })(); + + return DataSet; + })(); + + XyChart.Axis = (function() { + + /** + * Properties of an Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IAxis + * @property {string|null} [label] Axis label + * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale + */ + + /** + * Constructs a new Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents an Axis. + * @implements IAxis + * @constructor + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + */ + function Axis(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Axis label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.label = ""; + + /** + * Axis scale. + * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.scale = 0; + + /** + * Creates a new Axis instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance + */ + Axis.create = function create(properties) { + return new Axis(properties); + }; + + /** + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.scale != null && message.hasOwnProperty("scale")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); + return writer; + }; + + /** + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Axis message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.label = reader.string(); + break; + case 2: + message.scale = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Axis message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Axis message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Axis.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + switch (message.scale) { + default: + return "scale: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Axis message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + */ + Axis.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + if (object.label != null) + message.label = String(object.label); + switch (object.scale) { + case "SCALE_UNSPECIFIED": + case 0: + message.scale = 0; + break; + case "LINEAR": + case 1: + message.scale = 1; + break; + case "LOG10": + case 2: + message.scale = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Axis.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; + return object; + }; + + /** + * Converts this Axis to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + * @returns {Object.} JSON object + */ + Axis.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Scale enum. + * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale + * @enum {string} + * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value + * @property {number} LINEAR=1 LINEAR value + * @property {number} LOG10=2 LOG10 value + */ + Axis.Scale = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINEAR"] = 1; + values[valuesById[2] = "LOG10"] = 2; + return values; + })(); + + return Axis; + })(); + + return XyChart; + })(); + + v1.ChartOptions = (function() { + + /** + * Properties of a ChartOptions. + * @memberof google.monitoring.dashboard.v1 + * @interface IChartOptions + * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode + */ + + /** + * Constructs a new ChartOptions. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ChartOptions. + * @implements IChartOptions + * @constructor + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + */ + function ChartOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChartOptions mode. + * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @instance + */ + ChartOptions.prototype.mode = 0; + + /** + * Creates a new ChartOptions instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance + */ + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); + }; + + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && message.hasOwnProperty("mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartOptions message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + */ + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) + return object; + var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "COLOR": + case 1: + message.mode = 1; + break; + case "X_RAY": + case 2: + message.mode = 2; + break; + case "STATS": + case 3: + message.mode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this ChartOptions to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @instance + * @returns {Object.} JSON object + */ + ChartOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Mode enum. + * @name google.monitoring.dashboard.v1.ChartOptions.Mode + * @enum {string} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} COLOR=1 COLOR value + * @property {number} X_RAY=2 X_RAY value + * @property {number} STATS=3 STATS value + */ + ChartOptions.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COLOR"] = 1; + values[valuesById[2] = "X_RAY"] = 2; + values[valuesById[3] = "STATS"] = 3; + return values; + })(); + + return ChartOptions; + })(); + + v1.Widget = (function() { + + /** + * Properties of a Widget. + * @memberof google.monitoring.dashboard.v1 + * @interface IWidget + * @property {string|null} [title] Widget title + * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart + * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard + * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text + * @property {google.protobuf.IEmpty|null} [blank] Widget blank + */ + + /** + * Constructs a new Widget. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Widget. + * @implements IWidget + * @constructor + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + */ + function Widget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Widget title. + * @member {string} title + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.title = ""; + + /** + * Widget xyChart. + * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.xyChart = null; + + /** + * Widget scorecard. + * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.scorecard = null; + + /** + * Widget text. + * @member {google.monitoring.dashboard.v1.IText|null|undefined} text + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.text = null; + + /** + * Widget blank. + * @member {google.protobuf.IEmpty|null|undefined} blank + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.blank = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Widget content. + * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Object.defineProperty(Widget.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Widget instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Widget} Widget instance + */ + Widget.create = function create(properties) { + return new Widget(properties); + }; + + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && message.hasOwnProperty("title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.xyChart != null && message.hasOwnProperty("xyChart")) + $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.scorecard != null && message.hasOwnProperty("scorecard")) + $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.blank != null && message.hasOwnProperty("blank")) + $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Widget message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + break; + case 3: + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); + break; + case 4: + message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); + break; + case 5: + message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Widget message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Widget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); + if (error) + return "xyChart." + error; + } + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); + if (error) + return "scorecard." + error; + } + } + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.blank != null && message.hasOwnProperty("blank")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.protobuf.Empty.verify(message.blank); + if (error) + return "blank." + error; + } + } + return null; + }; + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Widget} Widget + */ + Widget.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Widget) + return object; + var message = new $root.google.monitoring.dashboard.v1.Widget(); + if (object.title != null) + message.title = String(object.title); + if (object.xyChart != null) { + if (typeof object.xyChart !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); + } + if (object.scorecard != null) { + if (typeof object.scorecard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); + } + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); + message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); + } + if (object.blank != null) { + if (typeof object.blank !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); + message.blank = $root.google.protobuf.Empty.fromObject(object.blank); + } + return message; + }; + + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.Widget} message Widget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Widget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); + if (options.oneofs) + object.content = "xyChart"; + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); + if (options.oneofs) + object.content = "scorecard"; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); + if (options.oneofs) + object.content = "text"; + } + if (message.blank != null && message.hasOwnProperty("blank")) { + object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); + if (options.oneofs) + object.content = "blank"; + } + return object; + }; + + /** + * Converts this Widget to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + * @returns {Object.} JSON object + */ + Widget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Widget; + })(); + + v1.GridLayout = (function() { + + /** + * Properties of a GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets + */ + + /** + * Constructs a new GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GridLayout. + * @implements IGridLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + */ + function GridLayout(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.widgets = $util.emptyArray; + + /** + * Creates a new GridLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + */ + GridLayout.create = function create(properties) { + return new GridLayout(properties); + }; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.hasOwnProperty("columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GridLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GridLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + */ + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + else if (typeof object.columns === "string") + message.columns = parseInt(object.columns, 10); + else if (typeof object.columns === "number") + message.columns = object.columns; + else if (typeof object.columns === "object") + message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GridLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.columns = options.longs === String ? "0" : 0; + if (message.columns != null && message.hasOwnProperty("columns")) + if (typeof message.columns === "number") + object.columns = options.longs === String ? String(message.columns) : message.columns; + else + object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this GridLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + * @returns {Object.} JSON object + */ + GridLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GridLayout; + })(); + + v1.RowLayout = (function() { + + /** + * Properties of a RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IRowLayout + * @property {Array.|null} [rows] RowLayout rows + */ + + /** + * Constructs a new RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a RowLayout. + * @implements IRowLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + */ + function RowLayout(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowLayout rows. + * @member {Array.} rows + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + */ + RowLayout.prototype.rows = $util.emptyArray; + + /** + * Creates a new RowLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + */ + RowLayout.create = function create(properties) { + return new RowLayout(properties); + }; + + /** + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RowLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + */ + RowLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); + message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this RowLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + * @returns {Object.} JSON object + */ + RowLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RowLayout.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @interface IRow + * @property {number|Long|null} [weight] Row weight + * @property {Array.|null} [widgets] Row widgets + */ + + /** + * Constructs a new Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Row widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.widgets = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && message.hasOwnProperty("weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Row; + })(); + + return RowLayout; + })(); + + v1.ColumnLayout = (function() { + + /** + * Properties of a ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IColumnLayout + * @property {Array.|null} [columns] ColumnLayout columns + */ + + /** + * Constructs a new ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ColumnLayout. + * @implements IColumnLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + */ + function ColumnLayout(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnLayout columns. + * @member {Array.} columns + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + */ + ColumnLayout.prototype.columns = $util.emptyArray; + + /** + * Creates a new ColumnLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance + */ + ColumnLayout.create = function create(properties) { + return new ColumnLayout(properties); + }; + + /** + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + */ + ColumnLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); + message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); + } + return object; + }; + + /** + * Converts this ColumnLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + * @returns {Object.} JSON object + */ + ColumnLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ColumnLayout.Column = (function() { + + /** + * Properties of a Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @interface IColumn + * @property {number|Long|null} [weight] Column weight + * @property {Array.|null} [widgets] Column widgets + */ + + /** + * Constructs a new Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + */ + function Column(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Column weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Column widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.widgets = $util.emptyArray; + + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && message.hasOwnProperty("weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Column message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + */ + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Column; + })(); + + return ColumnLayout; + })(); + + v1.Dashboard = (function() { + + /** + * Properties of a Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @interface IDashboard + * @property {string|null} [name] Dashboard name + * @property {string|null} [displayName] Dashboard displayName + * @property {string|null} [etag] Dashboard etag + * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout + * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout + * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + */ + + /** + * Constructs a new Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Dashboard. + * @implements IDashboard + * @constructor + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + */ + function Dashboard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dashboard name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.name = ""; + + /** + * Dashboard displayName. + * @member {string} displayName + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.displayName = ""; + + /** + * Dashboard etag. + * @member {string} etag + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.etag = ""; + + /** + * Dashboard gridLayout. + * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.gridLayout = null; + + /** + * Dashboard rowLayout. + * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.rowLayout = null; + + /** + * Dashboard columnLayout. + * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.columnLayout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dashboard layout. + * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Object.defineProperty(Dashboard.prototype, "layout", { + get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dashboard instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance + */ + Dashboard.create = function create(properties) { + return new Dashboard(properties); + }; + + /** + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) + $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) + $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) + $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dashboard message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + case 5: + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); + break; + case 8: + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); + break; + case 9: + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dashboard message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dashboard.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); + if (error) + return "gridLayout." + error; + } + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); + if (error) + return "rowLayout." + error; + } + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); + if (error) + return "columnLayout." + error; + } + } + return null; + }; + + /** + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + */ + Dashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) + return object; + var message = new $root.google.monitoring.dashboard.v1.Dashboard(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.etag != null) + message.etag = String(object.etag); + if (object.gridLayout != null) { + if (typeof object.gridLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); + } + if (object.rowLayout != null) { + if (typeof object.rowLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); + } + if (object.columnLayout != null) { + if (typeof object.columnLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); + } + return message; + }; + + /** + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dashboard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); + if (options.oneofs) + object.layout = "gridLayout"; + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); + if (options.oneofs) + object.layout = "rowLayout"; + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); + if (options.oneofs) + object.layout = "columnLayout"; + } + return object; + }; + + /** + * Converts this Dashboard to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + * @returns {Object.} JSON object + */ + Dashboard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Dashboard; + })(); + + v1.DashboardsService = (function() { + + /** + * Constructs a new DashboardsService service. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DashboardsService + * @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 DashboardsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DashboardsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DashboardsService; + + /** + * Creates new DashboardsService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @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 {DashboardsService} RPC service. Useful where requests and/or responses are streamed. + */ + DashboardsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef CreateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ + + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.createDashboard = function createDashboard(request, callback) { + return this.rpcCall(createDashboard, $root.google.monitoring.dashboard.v1.CreateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "CreateDashboard" }); + + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef ListDashboardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} [response] ListDashboardsResponse + */ + + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback} callback Node-style callback called with the error, if any, and ListDashboardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.listDashboards = function listDashboards(request, callback) { + return this.rpcCall(listDashboards, $root.google.monitoring.dashboard.v1.ListDashboardsRequest, $root.google.monitoring.dashboard.v1.ListDashboardsResponse, request, callback); + }, "name", { value: "ListDashboards" }); + + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef GetDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ + + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.getDashboard = function getDashboard(request, callback) { + return this.rpcCall(getDashboard, $root.google.monitoring.dashboard.v1.GetDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "GetDashboard" }); + + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef DeleteDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.deleteDashboard = function deleteDashboard(request, callback) { + return this.rpcCall(deleteDashboard, $root.google.monitoring.dashboard.v1.DeleteDashboardRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDashboard" }); + + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef UpdateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ + + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.updateDashboard = function updateDashboard(request, callback) { + return this.rpcCall(updateDashboard, $root.google.monitoring.dashboard.v1.UpdateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "UpdateDashboard" }); + + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DashboardsService; + })(); + + v1.CreateDashboardRequest = (function() { + + /** + * Properties of a CreateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface ICreateDashboardRequest + * @property {string|null} [parent] CreateDashboardRequest parent + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] CreateDashboardRequest dashboard + */ + + /** + * Constructs a new CreateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a CreateDashboardRequest. + * @implements ICreateDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set + */ + function CreateDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDashboardRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + */ + CreateDashboardRequest.prototype.parent = ""; + + /** + * CreateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + */ + CreateDashboardRequest.prototype.dashboard = null; + + /** + * Creates a new CreateDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest instance + */ + CreateDashboardRequest.create = function create(properties) { + return new CreateDashboardRequest(properties); + }; + + /** + * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDashboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } + return null; + }; + + /** + * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + */ + CreateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.CreateDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); + } + return message; + }; + + /** + * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.CreateDashboardRequest} message CreateDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDashboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dashboard = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); + return object; + }; + + /** + * Converts this CreateDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateDashboardRequest; + })(); + + v1.ListDashboardsRequest = (function() { + + /** + * Properties of a ListDashboardsRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IListDashboardsRequest + * @property {string|null} [parent] ListDashboardsRequest parent + * @property {number|null} [pageSize] ListDashboardsRequest pageSize + * @property {string|null} [pageToken] ListDashboardsRequest pageToken + */ + + /** + * Constructs a new ListDashboardsRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ListDashboardsRequest. + * @implements IListDashboardsRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set + */ + function ListDashboardsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDashboardsRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.parent = ""; + + /** + * ListDashboardsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.pageSize = 0; + + /** + * ListDashboardsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDashboardsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest instance + */ + ListDashboardsRequest.create = function create(properties) { + return new ListDashboardsRequest(properties); + }; + + /** + * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDashboardsRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDashboardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + */ + ListDashboardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.ListDashboardsRequest} message ListDashboardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDashboardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDashboardsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDashboardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDashboardsRequest; + })(); + + v1.ListDashboardsResponse = (function() { + + /** + * Properties of a ListDashboardsResponse. + * @memberof google.monitoring.dashboard.v1 + * @interface IListDashboardsResponse + * @property {Array.|null} [dashboards] ListDashboardsResponse dashboards + * @property {string|null} [nextPageToken] ListDashboardsResponse nextPageToken + */ + + /** + * Constructs a new ListDashboardsResponse. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ListDashboardsResponse. + * @implements IListDashboardsResponse + * @constructor + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + */ + function ListDashboardsResponse(properties) { + this.dashboards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDashboardsResponse dashboards. + * @member {Array.} dashboards + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + */ + ListDashboardsResponse.prototype.dashboards = $util.emptyArray; + + /** + * ListDashboardsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + */ + ListDashboardsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDashboardsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse instance + */ + ListDashboardsResponse.create = function create(properties) { + return new ListDashboardsResponse(properties); + }; + + /** + * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dashboards != null && message.dashboards.length) + for (var i = 0; i < message.dashboards.length; ++i) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dashboards && message.dashboards.length)) + message.dashboards = []; + message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDashboardsResponse message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDashboardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dashboards != null && message.hasOwnProperty("dashboards")) { + if (!Array.isArray(message.dashboards)) + return "dashboards: array expected"; + for (var i = 0; i < message.dashboards.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboards[i]); + if (error) + return "dashboards." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + */ + ListDashboardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsResponse) + return object; + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + if (object.dashboards) { + if (!Array.isArray(object.dashboards)) + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: array expected"); + message.dashboards = []; + for (var i = 0; i < object.dashboards.length; ++i) { + if (typeof object.dashboards[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: object expected"); + message.dashboards[i] = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboards[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} message ListDashboardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDashboardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dashboards = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dashboards && message.dashboards.length) { + object.dashboards = []; + for (var j = 0; j < message.dashboards.length; ++j) + object.dashboards[j] = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboards[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDashboardsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDashboardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListDashboardsResponse; + })(); + + v1.GetDashboardRequest = (function() { + + /** + * Properties of a GetDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IGetDashboardRequest + * @property {string|null} [name] GetDashboardRequest name + */ + + /** + * Constructs a new GetDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GetDashboardRequest. + * @implements IGetDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + */ + function GetDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @instance + */ + GetDashboardRequest.prototype.name = ""; + + /** + * Creates a new GetDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest instance + */ + GetDashboardRequest.create = function create(properties) { + return new GetDashboardRequest(properties); + }; + + /** + * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + 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 GetDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDashboardRequest.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 GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + */ + GetDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GetDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.GetDashboardRequest} message GetDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDashboardRequest.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 GetDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + GetDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDashboardRequest; + })(); + + v1.DeleteDashboardRequest = (function() { + + /** + * Properties of a DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IDeleteDashboardRequest + * @property {string|null} [name] DeleteDashboardRequest name + */ + + /** + * Constructs a new DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DeleteDashboardRequest. + * @implements IDeleteDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + */ + function DeleteDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @instance + */ + DeleteDashboardRequest.prototype.name = ""; + + /** + * Creates a new DeleteDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest instance + */ + DeleteDashboardRequest.create = function create(properties) { + return new DeleteDashboardRequest(properties); + }; + + /** + * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + 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 DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDashboardRequest.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 DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + */ + DeleteDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.DeleteDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.DeleteDashboardRequest} message DeleteDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDashboardRequest.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 DeleteDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteDashboardRequest; + })(); + + v1.UpdateDashboardRequest = (function() { + + /** + * Properties of an UpdateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IUpdateDashboardRequest + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] UpdateDashboardRequest dashboard + */ + + /** + * Constructs a new UpdateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents an UpdateDashboardRequest. + * @implements IUpdateDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set + */ + function UpdateDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @instance + */ + UpdateDashboardRequest.prototype.dashboard = null; + + /** + * Creates a new UpdateDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest instance + */ + UpdateDashboardRequest.create = function create(properties) { + return new UpdateDashboardRequest(properties); + }; + + /** + * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDashboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } + return null; + }; + + /** + * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + */ + UpdateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.UpdateDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.UpdateDashboardRequest} message UpdateDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDashboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dashboard = null; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); + return object; + }; + + /** + * Converts this UpdateDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateDashboardRequest; + })(); + + return v1; + })(); + + return dashboard; + })(); + + return monitoring; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("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 && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json new file mode 100644 index 00000000000..ae5524f3b61 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -0,0 +1,1784 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "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 + } + }, + "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": false + } + }, + "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 + } + } + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "monitoring": { + "nested": { + "dashboard": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", + "java_multiple_files": true, + "java_outer_classname": "DashboardsServiceProto", + "java_package": "com.google.monitoring.dashboard.v1" + }, + "nested": { + "Aggregation": { + "fields": { + "alignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "perSeriesAligner": { + "type": "Aligner", + "id": 2 + }, + "crossSeriesReducer": { + "type": "Reducer", + "id": 4 + }, + "groupByFields": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "Aligner": { + "values": { + "ALIGN_NONE": 0, + "ALIGN_DELTA": 1, + "ALIGN_RATE": 2, + "ALIGN_INTERPOLATE": 3, + "ALIGN_NEXT_OLDER": 4, + "ALIGN_MIN": 10, + "ALIGN_MAX": 11, + "ALIGN_MEAN": 12, + "ALIGN_COUNT": 13, + "ALIGN_SUM": 14, + "ALIGN_STDDEV": 15, + "ALIGN_COUNT_TRUE": 16, + "ALIGN_COUNT_FALSE": 24, + "ALIGN_FRACTION_TRUE": 17, + "ALIGN_PERCENTILE_99": 18, + "ALIGN_PERCENTILE_95": 19, + "ALIGN_PERCENTILE_50": 20, + "ALIGN_PERCENTILE_05": 21, + "ALIGN_PERCENT_CHANGE": 23 + } + }, + "Reducer": { + "values": { + "REDUCE_NONE": 0, + "REDUCE_MEAN": 1, + "REDUCE_MIN": 2, + "REDUCE_MAX": 3, + "REDUCE_SUM": 4, + "REDUCE_STDDEV": 5, + "REDUCE_COUNT": 6, + "REDUCE_COUNT_TRUE": 7, + "REDUCE_COUNT_FALSE": 15, + "REDUCE_FRACTION_TRUE": 8, + "REDUCE_PERCENTILE_99": 9, + "REDUCE_PERCENTILE_95": 10, + "REDUCE_PERCENTILE_50": 11, + "REDUCE_PERCENTILE_05": 12 + } + } + } + }, + "PickTimeSeriesFilter": { + "fields": { + "rankingMethod": { + "type": "Method", + "id": 1 + }, + "numTimeSeries": { + "type": "int32", + "id": 2 + }, + "direction": { + "type": "Direction", + "id": 3 + } + }, + "nested": { + "Method": { + "values": { + "METHOD_UNSPECIFIED": 0, + "METHOD_MEAN": 1, + "METHOD_MAX": 2, + "METHOD_MIN": 3, + "METHOD_SUM": 4, + "METHOD_LATEST": 5 + } + }, + "Direction": { + "values": { + "DIRECTION_UNSPECIFIED": 0, + "TOP": 1, + "BOTTOM": 2 + } + } + } + }, + "StatisticalTimeSeriesFilter": { + "fields": { + "rankingMethod": { + "type": "Method", + "id": 1 + }, + "numTimeSeries": { + "type": "int32", + "id": 2 + } + }, + "nested": { + "Method": { + "values": { + "METHOD_UNSPECIFIED": 0, + "METHOD_CLUSTER_OUTLIER": 1 + } + } + } + }, + "TimeSeriesQuery": { + "oneofs": { + "source": { + "oneof": [ + "timeSeriesFilter", + "timeSeriesFilterRatio" + ] + } + }, + "fields": { + "timeSeriesFilter": { + "type": "TimeSeriesFilter", + "id": 1 + }, + "timeSeriesFilterRatio": { + "type": "TimeSeriesFilterRatio", + "id": 2 + }, + "unitOverride": { + "type": "string", + "id": 5 + } + } + }, + "TimeSeriesFilter": { + "oneofs": { + "outputFilter": { + "oneof": [ + "pickTimeSeriesFilter", + "statisticalTimeSeriesFilter" + ] + } + }, + "fields": { + "filter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aggregation": { + "type": "Aggregation", + "id": 2 + }, + "pickTimeSeriesFilter": { + "type": "PickTimeSeriesFilter", + "id": 4 + }, + "statisticalTimeSeriesFilter": { + "type": "StatisticalTimeSeriesFilter", + "id": 5 + } + } + }, + "TimeSeriesFilterRatio": { + "oneofs": { + "outputFilter": { + "oneof": [ + "pickTimeSeriesFilter", + "statisticalTimeSeriesFilter" + ] + } + }, + "fields": { + "numerator": { + "type": "RatioPart", + "id": 1 + }, + "denominator": { + "type": "RatioPart", + "id": 2 + }, + "secondaryAggregation": { + "type": "Aggregation", + "id": 3 + }, + "pickTimeSeriesFilter": { + "type": "PickTimeSeriesFilter", + "id": 4 + }, + "statisticalTimeSeriesFilter": { + "type": "StatisticalTimeSeriesFilter", + "id": 5 + } + }, + "nested": { + "RatioPart": { + "fields": { + "filter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aggregation": { + "type": "Aggregation", + "id": 2 + } + } + } + } + }, + "Threshold": { + "fields": { + "label": { + "type": "string", + "id": 1 + }, + "value": { + "type": "double", + "id": 2 + }, + "color": { + "type": "Color", + "id": 3 + }, + "direction": { + "type": "Direction", + "id": 4 + } + }, + "nested": { + "Color": { + "values": { + "COLOR_UNSPECIFIED": 0, + "YELLOW": 4, + "RED": 6 + } + }, + "Direction": { + "values": { + "DIRECTION_UNSPECIFIED": 0, + "ABOVE": 1, + "BELOW": 2 + } + } + } + }, + "SparkChartType": { + "values": { + "SPARK_CHART_TYPE_UNSPECIFIED": 0, + "SPARK_LINE": 1, + "SPARK_BAR": 2 + } + }, + "Text": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "format": { + "type": "Format", + "id": 2 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "MARKDOWN": 1, + "RAW": 2 + } + } + } + }, + "Scorecard": { + "oneofs": { + "dataView": { + "oneof": [ + "gaugeView", + "sparkChartView" + ] + } + }, + "fields": { + "timeSeriesQuery": { + "type": "TimeSeriesQuery", + "id": 1 + }, + "gaugeView": { + "type": "GaugeView", + "id": 4 + }, + "sparkChartView": { + "type": "SparkChartView", + "id": 5 + }, + "thresholds": { + "rule": "repeated", + "type": "Threshold", + "id": 6 + } + }, + "nested": { + "GaugeView": { + "fields": { + "lowerBound": { + "type": "double", + "id": 1 + }, + "upperBound": { + "type": "double", + "id": 2 + } + } + }, + "SparkChartView": { + "fields": { + "sparkChartType": { + "type": "SparkChartType", + "id": 1 + }, + "minAlignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + } + } + }, + "XyChart": { + "fields": { + "dataSets": { + "rule": "repeated", + "type": "DataSet", + "id": 1 + }, + "timeshiftDuration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "thresholds": { + "rule": "repeated", + "type": "Threshold", + "id": 5 + }, + "xAxis": { + "type": "Axis", + "id": 6 + }, + "yAxis": { + "type": "Axis", + "id": 7 + }, + "chartOptions": { + "type": "ChartOptions", + "id": 8 + } + }, + "nested": { + "DataSet": { + "fields": { + "timeSeriesQuery": { + "type": "TimeSeriesQuery", + "id": 1 + }, + "plotType": { + "type": "PlotType", + "id": 2 + }, + "legendTemplate": { + "type": "string", + "id": 3 + }, + "minAlignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PlotType": { + "values": { + "PLOT_TYPE_UNSPECIFIED": 0, + "LINE": 1, + "STACKED_AREA": 2, + "STACKED_BAR": 3, + "HEATMAP": 4 + } + } + } + }, + "Axis": { + "fields": { + "label": { + "type": "string", + "id": 1 + }, + "scale": { + "type": "Scale", + "id": 2 + } + }, + "nested": { + "Scale": { + "values": { + "SCALE_UNSPECIFIED": 0, + "LINEAR": 1, + "LOG10": 2 + } + } + } + } + } + }, + "ChartOptions": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "COLOR": 1, + "X_RAY": 2, + "STATS": 3 + } + } + } + }, + "Widget": { + "oneofs": { + "content": { + "oneof": [ + "xyChart", + "scorecard", + "text", + "blank" + ] + } + }, + "fields": { + "title": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "xyChart": { + "type": "XyChart", + "id": 2 + }, + "scorecard": { + "type": "Scorecard", + "id": 3 + }, + "text": { + "type": "Text", + "id": 4 + }, + "blank": { + "type": "google.protobuf.Empty", + "id": 5 + } + } + }, + "GridLayout": { + "fields": { + "columns": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + }, + "RowLayout": { + "fields": { + "rows": { + "rule": "repeated", + "type": "Row", + "id": 1 + } + }, + "nested": { + "Row": { + "fields": { + "weight": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + } + } + }, + "ColumnLayout": { + "fields": { + "columns": { + "rule": "repeated", + "type": "Column", + "id": 1 + } + }, + "nested": { + "Column": { + "fields": { + "weight": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + } + } + }, + "Dashboard": { + "oneofs": { + "layout": { + "oneof": [ + "gridLayout", + "rowLayout", + "columnLayout" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "etag": { + "type": "string", + "id": 4 + }, + "gridLayout": { + "type": "GridLayout", + "id": 5 + }, + "rowLayout": { + "type": "RowLayout", + "id": 8 + }, + "columnLayout": { + "type": "ColumnLayout", + "id": 9 + } + } + }, + "DashboardsService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read,https://www.googleapis.com/auth/monitoring.write" + }, + "methods": { + "CreateDashboard": { + "requestType": "CreateDashboardRequest", + "responseType": "Dashboard", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/dashboards", + "(google.api.http).body": "dashboard" + } + }, + "ListDashboards": { + "requestType": "ListDashboardsRequest", + "responseType": "ListDashboardsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/dashboards" + } + }, + "GetDashboard": { + "requestType": "GetDashboardRequest", + "responseType": "Dashboard", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/dashboards/*}" + } + }, + "DeleteDashboard": { + "requestType": "DeleteDashboardRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/dashboards/*}" + } + }, + "UpdateDashboard": { + "requestType": "UpdateDashboardRequest", + "responseType": "Dashboard", + "options": { + "(google.api.http).patch": "/v1/{dashboard.name=projects/*/dashboards/*}", + "(google.api.http).body": "dashboard" + } + } + } + }, + "CreateDashboardRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dashboard": { + "type": "Dashboard", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListDashboardsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDashboardsResponse": { + "fields": { + "dashboards": { + "rule": "repeated", + "type": "Dashboard", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDashboardRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDashboardRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateDashboardRequest": { + "fields": { + "dashboard": { + "type": "Dashboard", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-monitoring-dashboard/samples/README.md b/packages/google-monitoring-dashboard/samples/README.md new file mode 100644 index 00000000000..6b12a3e672e --- /dev/null +++ b/packages/google-monitoring-dashboard/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 + +# [Monitoring Dashboards: Node.js Samples](https://github.com/googleapis/nodejs-monitoring-dashboards) + +[![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-monitoring-dashboards#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards&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-monitoring-dashboards&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json new file mode 100644 index 00000000000..5b7d4d84fc6 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "monitoring-dashboards-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=8" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/monitoring-dashboards": "^0.1.0" + }, + "devDependencies": { + "c8": "^5.0.1", + "chai": "^4.2.0", + "mocha": "^6.1.4" + } +} diff --git a/packages/google-monitoring-dashboard/samples/quickstart.js b/packages/google-monitoring-dashboard/samples/quickstart.js new file mode 100644 index 00000000000..2276954b8b6 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/quickstart.js @@ -0,0 +1,46 @@ +// 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. +// + +'use strict'; + +async function quickstart( + parent = 'projects/my-project' // Project to list dashboards for. +) { + // [START monitoring_dashboards_quickstart] + // Imports the Google Cloud client library + const { + DashboardsServiceClient, + } = require('@google-cloud/monitoring-dashboards'); + + // Creates a client + const ds = new DashboardsServiceClient(); + + // parent = 'projects/my-project', // Project to list dashboards for. + + async function listDashboards() { + const [dashboards] = await ds.listDashboards({ + parent, + }); + console.info('Listing Dashboards:'); + for (const dashboard of dashboards) { + console.info(`\t${dashboard.displayName}`); + } + } + listDashboards(); + // [END monitoring_dashboards_quickstart] +} + +const args = process.argv.slice(2); +quickstart(...args).catch(console.error); diff --git a/packages/google-monitoring-dashboard/samples/test/quickstart.js b/packages/google-monitoring-dashboard/samples/test/quickstart.js new file mode 100644 index 00000000000..1a591a3d6d4 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/test/quickstart.js @@ -0,0 +1,37 @@ +// 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. +// + +'use strict'; + +const path = require('path'); +const {assert} = require('chai'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const PROJECT_ID = process.env.GCLOUD_PROJECT; + +describe('Sample Integration Tests', () => { + it('should run quickstart.js', async () => { + const stdout = execSync(`node ./quickstart.js projects/${PROJECT_ID}`, { + cwd, + }); + // build should have exited with success status. + assert.include(stdout, 'Listing Dashboards'); + }); +}); diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts new file mode 100644 index 00000000000..2d93a8685ae --- /dev/null +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -0,0 +1,24 @@ +// 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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const DashboardsServiceClient = v1.DashboardsServiceClient; +export {v1, DashboardsServiceClient}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default {v1, DashboardsServiceClient}; diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts new file mode 100644 index 00000000000..50061a1e253 --- /dev/null +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -0,0 +1,771 @@ +// 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 +// +// 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 gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './dashboards_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Manages Stackdriver dashboards. A dashboard is an arrangement of data display + * widgets in a specific layout. + * @class + * @memberof v1 + */ +export class DashboardsServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _terminated = false; + auth: gax.GoogleAuth; + dashboardsServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DashboardsServiceClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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 {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof DashboardsServiceClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = typeof window !== 'undefined'; + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof DashboardsServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? 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 = { + listDashboards: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dashboards' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.dashboard.v1.DashboardsService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.dashboard.v1.DashboardsService. + this.dashboardsServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.dashboard.v1.DashboardsService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.dashboard.v1.DashboardsService, + 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 dashboardsServiceStubMethods = [ + 'createDashboard', + 'listDashboards', + 'getDashboard', + 'deleteDashboard', + 'updateDashboard', + ]; + + for (const methodName of dashboardsServiceStubMethods) { + const innerCallPromise = this.dashboardsServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + return apiCall(argument, callOptions, callback); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + createDashboard( + request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + | undefined + ), + {} | undefined + ] + >; + createDashboard( + request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a new custom dashboard. + * + * This method requires the `monitoring.dashboards.create` permission + * on the specified project. For more information, see + * [Google Cloud IAM](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. The {project_id_or_number} must match + * the dashboard resource name. + * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard + * Required. The initial dashboard specification. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createDashboard( + request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + return this._innerApiCalls.createDashboard(request, options, callback); + } + getDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + | undefined + ), + {} | undefined + ] + >; + getDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + | undefined, + {} | undefined + > + ): void; + /** + * Fetches a specific dashboard. + * + * This method requires the `monitoring.dashboards.get` permission + * on the specified dashboard. For more information, see + * [Google Cloud IAM](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Dashboard. The format is one of + * `"dashboards/{dashboard_id}"` (for system dashboards) or + * `"projects/{project_id_or_number}/dashboards/{dashboard_id}"` + * (for custom dashboards). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + return this._innerApiCalls.getDashboard(request, options, callback); + } + deleteDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | undefined + ), + {} | undefined + ] + >; + deleteDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes an existing custom dashboard. + * + * This method requires the `monitoring.dashboards.delete` permission + * on the specified dashboard. For more information, see + * [Google Cloud IAM](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Dashboard. The format is + * `"projects/{project_id_or_number}/dashboards/{dashboard_id}"`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + return this._innerApiCalls.deleteDashboard(request, options, callback); + } + updateDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | undefined + ), + {} | undefined + ] + >; + updateDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | undefined, + {} | undefined + > + ): void; + /** + * Replaces an existing custom dashboard with a new definition. + * + * This method requires the `monitoring.dashboards.update` permission + * on the specified dashboard. For more information, see + * [Google Cloud IAM](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard + * Required. The dashboard that will replace the existing dashboard. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateDashboard( + request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard, + | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard, + ( + | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + dashboard_name: request.dashboard!.name || '', + }); + return this._innerApiCalls.updateDashboard(request, options, callback); + } + + listDashboards( + request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard[], + protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + ] + >; + listDashboards( + request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard[], + protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + > + ): void; + /** + * Lists the existing dashboards. + * + * This method requires the `monitoring.dashboards.list` permission + * on the specified project. For more information, see + * [Google Cloud IAM](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The scope of the dashboards to list. A project scope must be + * specified in the form of `"projects/{project_id_or_number}"`. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * If unspecified, a default of 1000 is used. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * The client library support 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListDashboardsRequest]{@link google.monitoring.dashboard.v1.ListDashboardsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListDashboardsResponse]{@link google.monitoring.dashboard.v1.ListDashboardsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listDashboards( + request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard[], + protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.dashboard.v1.IDashboard[], + protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.dashboard.v1.IDashboard[], + protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + return this._innerApiCalls.listDashboards(request, options, callback); + } + + /** + * Equivalent to {@link listDashboards}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listDashboards} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The scope of the dashboards to list. A project scope must be + * specified in the form of `"projects/{project_id_or_number}"`. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * If unspecified, a default of 1000 is used. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard} on 'data' event. + */ + listDashboardsStream( + request?: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listDashboards.createStream( + this._innerApiCalls.listDashboards as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.dashboardsServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json new file mode 100644 index 00000000000..5ed805f20f6 --- /dev/null +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.monitoring.dashboard.v1.DashboardsService": { + "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": { + "CreateDashboard": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDashboards": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDashboard": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDashboard": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDashboard": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json new file mode 100644 index 00000000000..c6a2ae90738 --- /dev/null +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../protos/google/monitoring/dashboard/v1/common.proto", + "../../protos/google/monitoring/dashboard/v1/metrics.proto", + "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", + "../../protos/google/monitoring/dashboard/v1/text.proto", + "../../protos/google/monitoring/dashboard/v1/scorecard.proto", + "../../protos/google/monitoring/dashboard/v1/xychart.proto", + "../../protos/google/monitoring/dashboard/v1/widget.proto", + "../../protos/google/monitoring/dashboard/v1/layouts.proto", + "../../protos/google/monitoring/dashboard/v1/dashboard.proto", + "../../protos/google/monitoring/dashboard/v1/service.proto", + "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto" +] diff --git a/packages/google-monitoring-dashboard/src/v1/index.ts b/packages/google-monitoring-dashboard/src/v1/index.ts new file mode 100644 index 00000000000..359487375b2 --- /dev/null +++ b/packages/google-monitoring-dashboard/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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 +// +// 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 {DashboardsServiceClient} from './dashboards_service_client'; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata new file mode 100644 index 00000000000..05b172ebf04 --- /dev/null +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -0,0 +1,360 @@ +{ + "updateTime": "2020-01-03T23:59:54.480249Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "91ef2d9dd69807b0b79555f22566fb2d81e49ff9", + "internalRef": "287999179" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "monitoring-dashboard", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ], + "newFiles": [ + { + "path": "CONTRIBUTING.md" + }, + { + "path": ".prettierignore" + }, + { + "path": ".eslintignore" + }, + { + "path": "tslint.json" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "codecov.yaml" + }, + { + "path": "webpack.config.js" + }, + { + "path": ".nycrc" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "LICENSE" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "renovate.json" + }, + { + "path": ".jsdoc.js" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".prettierrc" + }, + { + "path": "README.md" + }, + { + "path": "test/gapic-dashboards_service-v1.ts" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/google/monitoring/dashboard/v1/metrics.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/drilldowns.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/text.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/scorecard.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/widget.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/dashboard.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/xychart.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/layouts.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/common.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/service.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/dashboards_service.proto" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": "__pycache__/synth.cpython-37.pyc" + }, + { + "path": "samples/README.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": "build/test/gapic-dashboards_service-v1.js" + }, + { + "path": "build/test/gapic-dashboards_service-v1.js.map" + }, + { + "path": "build/test/gapic-dashboards_service-v1.d.ts" + }, + { + "path": "build/protos/protos.json" + }, + { + "path": "build/protos/protos.js" + }, + { + "path": "build/protos/protos.d.ts" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/metrics.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/drilldowns.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/text.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/scorecard.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/widget.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/dashboard.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/xychart.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/layouts.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/common.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/service.proto" + }, + { + "path": "build/protos/google/monitoring/dashboard/v1/dashboards_service.proto" + }, + { + "path": "build/system-test/install.d.ts" + }, + { + "path": "build/system-test/install.js.map" + }, + { + "path": "build/system-test/install.js" + }, + { + "path": "build/src/index.js" + }, + { + "path": "build/src/index.js.map" + }, + { + "path": "build/src/index.d.ts" + }, + { + "path": "build/src/v1/index.js" + }, + { + "path": "build/src/v1/dashboards_service_client.d.ts" + }, + { + "path": "build/src/v1/dashboards_service_client.js.map" + }, + { + "path": "build/src/v1/dashboards_service_client_config.json" + }, + { + "path": "build/src/v1/dashboards_service_client.js" + }, + { + "path": "build/src/v1/index.js.map" + }, + { + "path": "build/src/v1/index.d.ts" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/dashboards_service_proto_list.json" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "src/v1/dashboards_service_client_config.json" + }, + { + "path": "src/v1/dashboards_service_client.ts" + } + ] +} \ No newline at end of file diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index 7049597473f..3dfe3288496 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -25,40 +25,21 @@ versions = ['v1'] for version in versions: library = gapic.typescript_library( - '@google-cloud/monitoring-dashboard', + 'monitoring-dashboard', generator_args={ + 'package-name': '@google-cloud/monitoring-dashboards' }, proto_path='/google/monitoring/dashboard/v1', version=version) -s.copy(library, excludes=['README.md']) +s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() templates = common_templates.node_library(source_location='build/src') -s.copy(templates, excludes=[]) +s.copy(templates, excludes=['.github/release-please.yml']) # Node.js specific cleanup -subprocess.run(['rm', '-rf', './system-test/fixtures']) subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npx', 'compileProtos', 'src']) -# Add missing jsdoc annotations: -s.replace("src/index.js", -r"""\/\*\* - \* @namespace google - \*/""", -r"""/** - * @namespace google - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.longrunning - */""") -s.replace("src/index.js", -r"namespace google.cloud.cloudbuild", -r"namespace google.devtools.cloudbuild") diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..4a5f6deb3ef --- /dev/null +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// 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 +// +// 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 dashboard = require('@google-cloud/monitoring-dashboards'); + +function main() { + const dashboardsServiceClient = new dashboard.DashboardsServiceClient(); +} + +main(); diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..af23d763c46 --- /dev/null +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,25 @@ +// 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 +// +// 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 {DashboardsServiceClient} from '@google-cloud/monitoring-dashboards'; + +function main() { + const dashboardsServiceClient = new DashboardsServiceClient(); +} + +main(); diff --git a/packages/google-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts new file mode 100644 index 00000000000..c9aa74ec221 --- /dev/null +++ b/packages/google-monitoring-dashboard/system-test/install.ts @@ -0,0 +1,51 @@ +// 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 +// +// 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('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts new file mode 100644 index 00000000000..35bcdd3470d --- /dev/null +++ b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts @@ -0,0 +1,331 @@ +// 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 +// +// 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 protosTypes from '../protos/protos'; +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +const dashboardsserviceModule = require('../src'); + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError | null, response?: {} | null): void; +} + +export class Operation { + constructor() {} + promise() {} +} +function mockSimpleGrpcMethod( + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +describe('v1.DashboardsServiceClient', () => { + it('has servicePath', () => { + const servicePath = + dashboardsserviceModule.v1.DashboardsServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + dashboardsserviceModule.v1.DashboardsServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = dashboardsserviceModule.v1.DashboardsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('createDashboard', () => { + it('invokes createDashboard without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDashboard = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createDashboard(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createDashboard with error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createDashboard = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createDashboard(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getDashboard', () => { + it('invokes getDashboard without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDashboard = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getDashboard(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getDashboard with error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getDashboard = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getDashboard(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteDashboard', () => { + it('invokes deleteDashboard without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDashboard = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteDashboard(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteDashboard with error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteDashboard = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteDashboard(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateDashboard', () => { + it('invokes updateDashboard without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; + request.dashboard = {}; + request.dashboard.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDashboard = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateDashboard(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateDashboard with error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; + request.dashboard = {}; + request.dashboard.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateDashboard = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateDashboard(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listDashboards', () => { + it('invokes listDashboards without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDashboards = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listDashboards(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listDashboardsStream', () => { + it('invokes listDashboardsStream without error', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listDashboards = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listDashboardsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); +}); diff --git a/packages/google-monitoring-dashboard/tsconfig.json b/packages/google-monitoring-dashboard/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-monitoring-dashboard/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-monitoring-dashboard/tslint.json b/packages/google-monitoring-dashboard/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-monitoring-dashboard/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-monitoring-dashboard/webpack.config.js b/packages/google-monitoring-dashboard/webpack.config.js new file mode 100644 index 00000000000..f91876850d2 --- /dev/null +++ b/packages/google-monitoring-dashboard/webpack.config.js @@ -0,0 +1,64 @@ +// 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 +// +// 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: 'DashboardsService', + filename: './dashboards-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 932ab06db1c6c23f9f65ea815f8a70a36e006a23 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2020 16:19:28 -0800 Subject: [PATCH 003/181] chore: release 1.0.0 (#4) --- packages/google-monitoring-dashboard/CHANGELOG.md | 12 ++++++++++++ packages/google-monitoring-dashboard/package.json | 2 +- .../google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 packages/google-monitoring-dashboard/CHANGELOG.md diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md new file mode 100644 index 00000000000..c3ee32d14a2 --- /dev/null +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 1.0.0 (2020-01-04) + + +### ⚠ BREAKING CHANGES + +* initial generation of library (#1) + +### Features + +* initial generation of library ([#1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/1)) ([b513f47](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/b513f47f8d6d34380ea8ebedb0e9b41f360630ab)) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 805c436fabf..f62592da0fb 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "0.1.0", + "version": "1.0.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 5b7d4d84fc6..fd2b1c40532 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^0.1.0" + "@google-cloud/monitoring-dashboards": "^1.0.0" }, "devDependencies": { "c8": "^5.0.1", From f51fa58bfc5317bc271f784900a54d6c7167f63b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 7 Jan 2020 01:30:13 +0200 Subject: [PATCH 004/181] chore(deps): update dependency mocha to v7 (#6) --- packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index f62592da0fb..ebdc98fbc03 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -40,7 +40,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.0.0", + "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.19.1", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index fd2b1c40532..3d99325af1e 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^5.0.1", "chai": "^4.2.0", - "mocha": "^6.1.4" + "mocha": "^7.0.0" } } From 95950d98bf024496118544e9434de9e711f2203a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 7 Jan 2020 01:30:34 +0200 Subject: [PATCH 005/181] chore(deps): update dependency c8 to v7 (#5) --- packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index ebdc98fbc03..0ad0d938b30 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@types/mocha": "^5.2.5", "@types/node": "^12.0.0", - "c8": "^6.0.0", + "c8": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.9.0", "eslint-plugin-node": "^11.0.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 3d99325af1e..3b1a53fe66e 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -16,7 +16,7 @@ "@google-cloud/monitoring-dashboards": "^1.0.0" }, "devDependencies": { - "c8": "^5.0.1", + "c8": "^7.0.0", "chai": "^4.2.0", "mocha": "^7.0.0" } From a2104cf07f5045f76c2453052d5900f150970be2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2020 12:37:46 -0800 Subject: [PATCH 006/181] chore: release 1.0.1 (#8) --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index c3ee32d14a2..ed9d44f6aca 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.0...v1.0.1) (2020-01-09) + + +### Bug Fixes + +* **build:** autorelease should handle tagging ([#7](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/7)) ([000aed2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/000aed25e186f6e174ca49aa90dd0d4d6f651644)) + ## 1.0.0 (2020-01-04) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 0ad0d938b30..647abe5acbc 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.0.0", + "version": "1.0.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 3b1a53fe66e..7a79165a156 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.0.0" + "@google-cloud/monitoring-dashboards": "^1.0.1" }, "devDependencies": { "c8": "^7.0.0", From 3700dcac3eb87d716e13bf83261945a0372edbe4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 13 Jan 2020 18:28:11 -0800 Subject: [PATCH 007/181] build: generate library with new annotations --- .../linkinator.config.json | 6 +- .../protos/protos.d.ts | 212 ++++---- .../protos/protos.js | 488 +++++++++--------- .../protos/protos.json | 44 +- .../src/v1/dashboards_service_client.ts | 2 +- .../src/v1/dashboards_service_proto_list.json | 8 +- .../synth.metadata | 335 +----------- 7 files changed, 381 insertions(+), 714 deletions(-) diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json index e689c5b1b54..d780d6bfff5 100644 --- a/packages/google-monitoring-dashboard/linkinator.config.json +++ b/packages/google-monitoring-dashboard/linkinator.config.json @@ -2,10 +2,6 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com", - "https://www.npmjs.org/package/@google-cloud/monitoring-dashboards", - "https://googleapis.dev/nodejs/monitoring-dashboards/latest", - "https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/samples/quickstart.js", - "https://github.com/googleapis/nodejs-monitoring-dashboards/tree/master/samples" + "www.googleapis.com" ] } diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 396233555ab..49c913ae53a 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -4354,112 +4354,6 @@ export namespace google { SPARK_BAR = 2 } - /** Properties of a Text. */ - interface IText { - - /** Text content */ - content?: (string|null); - - /** Text format */ - format?: (google.monitoring.dashboard.v1.Text.Format|null); - } - - /** Represents a Text. */ - class Text implements IText { - - /** - * Constructs a new Text. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IText); - - /** Text content. */ - public content: string; - - /** Text format. */ - public format: google.monitoring.dashboard.v1.Text.Format; - - /** - * Creates a new Text instance using the specified properties. - * @param [properties] Properties to set - * @returns Text instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; - - /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Text message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; - - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; - - /** - * Verifies a Text message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Text - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; - - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @param message Text - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Text to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Text { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - MARKDOWN = 1, - RAW = 2 - } - } - /** Properties of a Scorecard. */ interface IScorecard { @@ -4766,6 +4660,112 @@ export namespace google { } } + /** Properties of a Text. */ + interface IText { + + /** Text content */ + content?: (string|null); + + /** Text format */ + format?: (google.monitoring.dashboard.v1.Text.Format|null); + } + + /** Represents a Text. */ + class Text implements IText { + + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IText); + + /** Text content. */ + public content: string; + + /** Text format. */ + public format: google.monitoring.dashboard.v1.Text.Format; + + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Text message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; + + /** + * Verifies a Text message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Text + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Text { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + MARKDOWN = 1, + RAW = 2 + } + } + /** Properties of a XyChart. */ interface IXyChart { diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 32fba31c057..955c8e77ec6 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -11756,250 +11756,6 @@ return values; })(); - v1.Text = (function() { - - /** - * Properties of a Text. - * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format - */ - - /** - * Constructs a new Text. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - */ - function Text(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.content = ""; - - /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.format = 0; - - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; - - /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); - return writer; - }; - - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Text message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.format = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Text message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Text.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Text) - return object; - var message = new $root.google.monitoring.dashboard.v1.Text(); - if (object.content != null) - message.content = String(object.content); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "MARKDOWN": - case 1: - message.format = 1; - break; - case "RAW": - case 2: - message.format = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.Text} message Text - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Text.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Format enum. - * @name google.monitoring.dashboard.v1.Text.Format - * @enum {string} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} MARKDOWN=1 MARKDOWN value - * @property {number} RAW=2 RAW value - */ - Text.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MARKDOWN"] = 1; - values[valuesById[2] = "RAW"] = 2; - return values; - })(); - - return Text; - })(); - v1.Scorecard = (function() { /** @@ -12760,6 +12516,250 @@ return Scorecard; })(); + v1.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.monitoring.dashboard.v1 + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + */ + + /** + * Constructs a new Text. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.content = ""; + + /** + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.format = 0; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.format = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Text message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Text) + return object; + var message = new $root.google.monitoring.dashboard.v1.Text(); + if (object.content != null) + message.content = String(object.content); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "MARKDOWN": + case 1: + message.format = 1; + break; + case "RAW": + case 2: + message.format = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Format enum. + * @name google.monitoring.dashboard.v1.Text.Format + * @enum {string} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} MARKDOWN=1 MARKDOWN value + * @property {number} RAW=2 RAW value + */ + Text.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MARKDOWN"] = 1; + values[valuesById[2] = "RAW"] = 2; + return values; + })(); + + return Text; + })(); + v1.XyChart = (function() { /** diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index ae5524f3b61..c80a24c56c1 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -927,7 +927,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", "java_multiple_files": true, - "java_outer_classname": "DashboardsServiceProto", + "java_outer_classname": "ServiceMonitoringProto", "java_package": "com.google.monitoring.dashboard.v1" }, "nested": { @@ -1197,27 +1197,6 @@ "SPARK_BAR": 2 } }, - "Text": { - "fields": { - "content": { - "type": "string", - "id": 1 - }, - "format": { - "type": "Format", - "id": 2 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "MARKDOWN": 1, - "RAW": 2 - } - } - } - }, "Scorecard": { "oneofs": { "dataView": { @@ -1273,6 +1252,27 @@ } } }, + "Text": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "format": { + "type": "Format", + "id": 2 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "MARKDOWN": 1, + "RAW": 2 + } + } + } + }, "XyChart": { "fields": { "dataSets": { diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 50061a1e253..b431fd3635e 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -610,7 +610,7 @@ export class DashboardsServiceClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - dashboard_name: request.dashboard!.name || '', + 'dashboard.name': request.dashboard!.name || '', }); return this._innerApiCalls.updateDashboard(request, options, callback); } diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json index c6a2ae90738..8d271522498 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -1,13 +1,13 @@ [ "../../protos/google/monitoring/dashboard/v1/common.proto", "../../protos/google/monitoring/dashboard/v1/metrics.proto", - "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", - "../../protos/google/monitoring/dashboard/v1/text.proto", "../../protos/google/monitoring/dashboard/v1/scorecard.proto", + "../../protos/google/monitoring/dashboard/v1/text.proto", "../../protos/google/monitoring/dashboard/v1/xychart.proto", "../../protos/google/monitoring/dashboard/v1/widget.proto", + "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", "../../protos/google/monitoring/dashboard/v1/layouts.proto", "../../protos/google/monitoring/dashboard/v1/dashboard.proto", - "../../protos/google/monitoring/dashboard/v1/service.proto", - "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto" + "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", + "../../protos/google/monitoring/dashboard/v1/service.proto" ] diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 05b172ebf04..e4e99109f71 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2020-01-03T23:59:54.480249Z", + "updateTime": "2020-01-10T12:23:49.192009Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91ef2d9dd69807b0b79555f22566fb2d81e49ff9", - "internalRef": "287999179" + "sha": "360a8792ed62f944109d7e22d613a04a010665b4", + "internalRef": "289011995" } }, { @@ -27,334 +27,5 @@ "generator": "gapic-generator-typescript" } } - ], - "newFiles": [ - { - "path": "CONTRIBUTING.md" - }, - { - "path": ".prettierignore" - }, - { - "path": ".eslintignore" - }, - { - "path": "tslint.json" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".nycrc" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "LICENSE" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "renovate.json" - }, - { - "path": ".jsdoc.js" - }, - { - "path": "tsconfig.json" - }, - { - "path": ".prettierrc" - }, - { - "path": "README.md" - }, - { - "path": "test/gapic-dashboards_service-v1.ts" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/google/monitoring/dashboard/v1/metrics.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/drilldowns.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/text.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/scorecard.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/widget.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/dashboard.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/xychart.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/layouts.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/common.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/service.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/dashboards_service.proto" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": "__pycache__/synth.cpython-37.pyc" - }, - { - "path": "samples/README.md" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": "build/test/gapic-dashboards_service-v1.js" - }, - { - "path": "build/test/gapic-dashboards_service-v1.js.map" - }, - { - "path": "build/test/gapic-dashboards_service-v1.d.ts" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/metrics.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/drilldowns.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/text.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/scorecard.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/widget.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/dashboard.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/xychart.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/layouts.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/common.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/service.proto" - }, - { - "path": "build/protos/google/monitoring/dashboard/v1/dashboards_service.proto" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/v1/index.js" - }, - { - "path": "build/src/v1/dashboards_service_client.d.ts" - }, - { - "path": "build/src/v1/dashboards_service_client.js.map" - }, - { - "path": "build/src/v1/dashboards_service_client_config.json" - }, - { - "path": "build/src/v1/dashboards_service_client.js" - }, - { - "path": "build/src/v1/index.js.map" - }, - { - "path": "build/src/v1/index.d.ts" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/dashboards_service_proto_list.json" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "src/v1/dashboards_service_client_config.json" - }, - { - "path": "src/v1/dashboards_service_client.ts" - } ] } \ No newline at end of file From e4a269ab8715d38583f7246929ad2c7d03554cdc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 Jan 2020 16:25:49 -0800 Subject: [PATCH 008/181] chore: clear synth.metadata --- .../synth.metadata | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 packages/google-monitoring-dashboard/synth.metadata diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata deleted file mode 100644 index e4e99109f71..00000000000 --- a/packages/google-monitoring-dashboard/synth.metadata +++ /dev/null @@ -1,31 +0,0 @@ -{ - "updateTime": "2020-01-10T12:23:49.192009Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "360a8792ed62f944109d7e22d613a04a010665b4", - "internalRef": "289011995" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "monitoring-dashboard", - "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" - } - } - ] -} \ No newline at end of file From 74a0ad5370bf0e55d4b4fe1bf933e37fd770b20b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 27 Jan 2020 16:01:14 -0800 Subject: [PATCH 009/181] chore: regenerate synth.metadata (#14) --- .../synth.metadata | 297 ++++++++++++++++++ 1 file changed, 297 insertions(+) create mode 100644 packages/google-monitoring-dashboard/synth.metadata diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata new file mode 100644 index 00000000000..150f01c28e9 --- /dev/null +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -0,0 +1,297 @@ +{ + "updateTime": "2020-01-24T12:25:18.612072Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", + "internalRef": "291240093" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "monitoring-dashboard", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ], + "newFiles": [ + { + "path": ".eslintignore" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/publish.yml" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".gitignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".nycrc" + }, + { + "path": ".prettierignore" + }, + { + "path": ".prettierrc" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "LICENSE" + }, + { + "path": "README.md" + }, + { + "path": "codecov.yaml" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "package.json" + }, + { + "path": "protos/google/monitoring/dashboard/v1/common.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/dashboard.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/dashboards_service.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/drilldowns.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/layouts.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/metrics.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/scorecard.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/service.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/text.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/widget.proto" + }, + { + "path": "protos/google/monitoring/dashboard/v1/xychart.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/test/quickstart.js" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/dashboards_service_client.ts" + }, + { + "path": "src/v1/dashboards_service_client_config.json" + }, + { + "path": "src/v1/dashboards_service_proto_list.json" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/fixtures/sample/src/index.js" + }, + { + "path": "system-test/fixtures/sample/src/index.ts" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "test/gapic-dashboards_service-v1.ts" + }, + { + "path": "tsconfig.json" + }, + { + "path": "tslint.json" + }, + { + "path": "webpack.config.js" + } + ] +} \ No newline at end of file From e27f7950eab1e9878572e575258174f784ace8d0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2020 14:28:12 -0800 Subject: [PATCH 010/181] fix: enum, bytes, and Long types now accept strings --- .../protos/protos.d.ts | 100 +++++++++--------- .../synth.metadata | 10 +- 2 files changed, 57 insertions(+), 53 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 49c913ae53a..34ee5cf4c5c 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -24,7 +24,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -40,7 +40,7 @@ export namespace google { constructor(properties?: google.protobuf.IDuration); /** Duration seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Duration nanos. */ public nanos: number; @@ -807,10 +807,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -847,10 +847,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -1625,7 +1625,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -1698,7 +1698,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -1944,13 +1944,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -1978,13 +1978,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.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; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -2483,7 +2483,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -2508,7 +2508,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -2604,16 +2604,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -2635,16 +2635,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -3418,10 +3418,10 @@ export namespace google { alignmentPeriod?: (google.protobuf.IDuration|null); /** Aggregation perSeriesAligner */ - perSeriesAligner?: (google.monitoring.dashboard.v1.Aggregation.Aligner|null); + perSeriesAligner?: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner|null); /** Aggregation crossSeriesReducer */ - crossSeriesReducer?: (google.monitoring.dashboard.v1.Aggregation.Reducer|null); + crossSeriesReducer?: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer|null); /** Aggregation groupByFields */ groupByFields?: (string[]|null); @@ -3440,10 +3440,10 @@ export namespace google { public alignmentPeriod?: (google.protobuf.IDuration|null); /** Aggregation perSeriesAligner. */ - public perSeriesAligner: google.monitoring.dashboard.v1.Aggregation.Aligner; + public perSeriesAligner: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner); /** Aggregation crossSeriesReducer. */ - public crossSeriesReducer: google.monitoring.dashboard.v1.Aggregation.Reducer; + public crossSeriesReducer: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer); /** Aggregation groupByFields. */ public groupByFields: string[]; @@ -3567,13 +3567,13 @@ export namespace google { interface IPickTimeSeriesFilter { /** PickTimeSeriesFilter rankingMethod */ - rankingMethod?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null); + rankingMethod?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null); /** PickTimeSeriesFilter numTimeSeries */ numTimeSeries?: (number|null); /** PickTimeSeriesFilter direction */ - direction?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null); + direction?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null); } /** Represents a PickTimeSeriesFilter. */ @@ -3586,13 +3586,13 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter); /** PickTimeSeriesFilter rankingMethod. */ - public rankingMethod: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method; + public rankingMethod: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method); /** PickTimeSeriesFilter numTimeSeries. */ public numTimeSeries: number; /** PickTimeSeriesFilter direction. */ - public direction: google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction; + public direction: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction); /** * Creates a new PickTimeSeriesFilter instance using the specified properties. @@ -3689,7 +3689,7 @@ export namespace google { interface IStatisticalTimeSeriesFilter { /** StatisticalTimeSeriesFilter rankingMethod */ - rankingMethod?: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null); + rankingMethod?: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null); /** StatisticalTimeSeriesFilter numTimeSeries */ numTimeSeries?: (number|null); @@ -3705,7 +3705,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter); /** StatisticalTimeSeriesFilter rankingMethod. */ - public rankingMethod: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method; + public rankingMethod: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method); /** StatisticalTimeSeriesFilter numTimeSeries. */ public numTimeSeries: number; @@ -4232,10 +4232,10 @@ export namespace google { value?: (number|null); /** Threshold color */ - color?: (google.monitoring.dashboard.v1.Threshold.Color|null); + color?: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color|null); /** Threshold direction */ - direction?: (google.monitoring.dashboard.v1.Threshold.Direction|null); + direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); } /** Represents a Threshold. */ @@ -4254,10 +4254,10 @@ export namespace google { public value: number; /** Threshold color. */ - public color: google.monitoring.dashboard.v1.Threshold.Color; + public color: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color); /** Threshold direction. */ - public direction: google.monitoring.dashboard.v1.Threshold.Direction; + public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); /** * Creates a new Threshold instance using the specified properties. @@ -4567,7 +4567,7 @@ export namespace google { interface ISparkChartView { /** SparkChartView sparkChartType */ - sparkChartType?: (google.monitoring.dashboard.v1.SparkChartType|null); + sparkChartType?: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType|null); /** SparkChartView minAlignmentPeriod */ minAlignmentPeriod?: (google.protobuf.IDuration|null); @@ -4583,7 +4583,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView); /** SparkChartView sparkChartType. */ - public sparkChartType: google.monitoring.dashboard.v1.SparkChartType; + public sparkChartType: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType); /** SparkChartView minAlignmentPeriod. */ public minAlignmentPeriod?: (google.protobuf.IDuration|null); @@ -4667,7 +4667,7 @@ export namespace google { content?: (string|null); /** Text format */ - format?: (google.monitoring.dashboard.v1.Text.Format|null); + format?: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format|null); } /** Represents a Text. */ @@ -4683,7 +4683,7 @@ export namespace google { public content: string; /** Text format. */ - public format: google.monitoring.dashboard.v1.Text.Format; + public format: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format); /** * Creates a new Text instance using the specified properties. @@ -4895,7 +4895,7 @@ export namespace google { timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); /** DataSet plotType */ - plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); + plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); /** DataSet legendTemplate */ legendTemplate?: (string|null); @@ -4917,7 +4917,7 @@ export namespace google { public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); /** DataSet plotType. */ - public plotType: google.monitoring.dashboard.v1.XyChart.DataSet.PlotType; + public plotType: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType); /** DataSet legendTemplate. */ public legendTemplate: string; @@ -5015,7 +5015,7 @@ export namespace google { label?: (string|null); /** Axis scale */ - scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); + scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); } /** Represents an Axis. */ @@ -5031,7 +5031,7 @@ export namespace google { public label: string; /** Axis scale. */ - public scale: google.monitoring.dashboard.v1.XyChart.Axis.Scale; + public scale: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale); /** * Creates a new Axis instance using the specified properties. @@ -5119,7 +5119,7 @@ export namespace google { interface IChartOptions { /** ChartOptions mode */ - mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|null); + mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode|null); } /** Represents a ChartOptions. */ @@ -5132,7 +5132,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); /** ChartOptions mode. */ - public mode: google.monitoring.dashboard.v1.ChartOptions.Mode; + public mode: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode); /** * Creates a new ChartOptions instance using the specified properties. @@ -5337,7 +5337,7 @@ export namespace google { interface IGridLayout { /** GridLayout columns */ - columns?: (number|Long|null); + columns?: (number|Long|string|null); /** GridLayout widgets */ widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); @@ -5353,7 +5353,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); /** GridLayout columns. */ - public columns: (number|Long); + public columns: (number|Long|string); /** GridLayout widgets. */ public widgets: google.monitoring.dashboard.v1.IWidget[]; @@ -5525,7 +5525,7 @@ export namespace google { interface IRow { /** Row weight */ - weight?: (number|Long|null); + weight?: (number|Long|string|null); /** Row widgets */ widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); @@ -5541,7 +5541,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); /** Row weight. */ - public weight: (number|Long); + public weight: (number|Long|string); /** Row widgets. */ public widgets: google.monitoring.dashboard.v1.IWidget[]; @@ -5714,7 +5714,7 @@ export namespace google { interface IColumn { /** Column weight */ - weight?: (number|Long|null); + weight?: (number|Long|string|null); /** Column widgets */ widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); @@ -5730,7 +5730,7 @@ export namespace google { constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); /** Column weight. */ - public weight: (number|Long); + public weight: (number|Long|string); /** Column widgets. */ public widgets: google.monitoring.dashboard.v1.IWidget[]; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 150f01c28e9..a5fee6943ac 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-01-24T12:25:18.612072Z", + "updateTime": "2020-01-28T12:26:43.184397Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", - "internalRef": "291240093" + "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", + "internalRef": "291821782", + "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\n" } }, { @@ -269,6 +270,9 @@ { "path": "src/v1/index.ts" }, + { + "path": "synth.metadata" + }, { "path": "synth.py" }, From 5f96ccdc144fcbba3fa7bda33fb44d332eaa10ca Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 21:03:06 -0800 Subject: [PATCH 011/181] chore: release 1.0.2 (#16) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index ed9d44f6aca..c6b0fce8b1b 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-28) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([beecd33](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/beecd3387117e9d52b845f938000a8284ed8212f)) + ### [1.0.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.0...v1.0.1) (2020-01-09) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 647abe5acbc..5a8b7ab0603 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.0.1", + "version": "1.0.2", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 7a79165a156..3876d42661b 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.0.1" + "@google-cloud/monitoring-dashboards": "^1.0.2" }, "devDependencies": { "c8": "^7.0.0", From 0eacd03275a9ba716125ebf9085142412f5764f4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Jan 2020 16:34:19 +0100 Subject: [PATCH 012/181] chore(deps): update dependency @types/mocha to v7 --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 5a8b7ab0603..59aa9f33b23 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -28,7 +28,7 @@ "google-gax": "^1.12.0" }, "devDependencies": { - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", "c8": "^7.0.0", "eslint": "^6.8.0", From 4bd848d5bf18e98012bbaa50a7eb160f4d334b4d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 11:50:56 -0800 Subject: [PATCH 013/181] chore: release 1.0.2 (#18) --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index c6b0fce8b1b..ccc1793b0b9 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-30) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([beecd33](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/beecd3387117e9d52b845f938000a8284ed8212f)) + ### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-28) From 67a1b646745f6c9ee47528a971c6d227db70d942 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jan 2020 11:59:44 -0800 Subject: [PATCH 014/181] chore: fix CHANGELOG --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index ccc1793b0b9..c6b0fce8b1b 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,12 +1,5 @@ # Changelog -### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-30) - - -### Bug Fixes - -* enum, bytes, and Long types now accept strings ([beecd33](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/beecd3387117e9d52b845f938000a8284ed8212f)) - ### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-28) From 94e608e433bd2d9e602ba9cb6155a6392ba56cba Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:45 -0800 Subject: [PATCH 015/181] chore: skip img.shields.io in docs test --- packages/google-monitoring-dashboard/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json index d780d6bfff5..b555215ca02 100644 --- a/packages/google-monitoring-dashboard/linkinator.config.json +++ b/packages/google-monitoring-dashboard/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "img.shields.io" ] } From bc6d55eb234bf596d289ef9ac72c0e6337abd185 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 20:53:23 -0800 Subject: [PATCH 016/181] test: modernize mocha config (#21) --- packages/google-monitoring-dashboard/.mocharc.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/google-monitoring-dashboard/.mocharc.json diff --git a/packages/google-monitoring-dashboard/.mocharc.json b/packages/google-monitoring-dashboard/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/packages/google-monitoring-dashboard/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} From fb2ffb4ad62091cd7c6b36158eaf9168a510bf65 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Feb 2020 10:29:31 -0800 Subject: [PATCH 017/181] fix: pass x-goog-request-params header for streaming calls --- .../google-monitoring-dashboard/.gitignore | 1 - .../protos/protos.d.ts | 1982 ++--- .../protos/protos.js | 6842 ++++++++--------- .../protos/protos.json | 380 +- .../src/v1/dashboards_service_client.ts | 10 +- .../src/v1/dashboards_service_proto_list.json | 12 +- .../synth.metadata | 279 +- .../test/gapic-dashboards_service-v1.ts | 12 +- 8 files changed, 4632 insertions(+), 4886 deletions(-) diff --git a/packages/google-monitoring-dashboard/.gitignore b/packages/google-monitoring-dashboard/.gitignore index e1a76628b30..5d32b23782f 100644 --- a/packages/google-monitoring-dashboard/.gitignore +++ b/packages/google-monitoring-dashboard/.gitignore @@ -12,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ - diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 34ee5cf4c5c..f03968dbb16 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -3790,590 +3790,740 @@ export namespace google { } } - /** Properties of a TimeSeriesQuery. */ - interface ITimeSeriesQuery { + /** Properties of a Dashboard. */ + interface IDashboard { - /** TimeSeriesQuery timeSeriesFilter */ - timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + /** Dashboard name */ + name?: (string|null); - /** TimeSeriesQuery timeSeriesFilterRatio */ - timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + /** Dashboard displayName */ + displayName?: (string|null); - /** TimeSeriesQuery unitOverride */ - unitOverride?: (string|null); + /** Dashboard etag */ + etag?: (string|null); + + /** Dashboard gridLayout */ + gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + + /** Dashboard rowLayout */ + rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + + /** Dashboard columnLayout */ + columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); } - /** Represents a TimeSeriesQuery. */ - class TimeSeriesQuery implements ITimeSeriesQuery { + /** Represents a Dashboard. */ + class Dashboard implements IDashboard { /** - * Constructs a new TimeSeriesQuery. + * Constructs a new Dashboard. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery); + constructor(properties?: google.monitoring.dashboard.v1.IDashboard); - /** TimeSeriesQuery timeSeriesFilter. */ - public timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + /** Dashboard name. */ + public name: string; - /** TimeSeriesQuery timeSeriesFilterRatio. */ - public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + /** Dashboard displayName. */ + public displayName: string; - /** TimeSeriesQuery unitOverride. */ - public unitOverride: string; + /** Dashboard etag. */ + public etag: string; - /** TimeSeriesQuery source. */ - public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"); + /** Dashboard gridLayout. */ + public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + + /** Dashboard rowLayout. */ + public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + + /** Dashboard columnLayout. */ + public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + + /** Dashboard layout. */ + public layout?: ("gridLayout"|"rowLayout"|"columnLayout"); /** - * Creates a new TimeSeriesQuery instance using the specified properties. + * Creates a new Dashboard instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSeriesQuery instance + * @returns Dashboard instance */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery): google.monitoring.dashboard.v1.TimeSeriesQuery; + public static create(properties?: google.monitoring.dashboard.v1.IDashboard): google.monitoring.dashboard.v1.Dashboard; /** - * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @param message TimeSeriesQuery message or plain object to encode + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @param message TimeSeriesQuery message or plain object to encode + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * Decodes a Dashboard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSeriesQuery + * @returns Dashboard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesQuery; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Dashboard; /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * Decodes a Dashboard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSeriesQuery + * @returns Dashboard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesQuery; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Dashboard; /** - * Verifies a TimeSeriesQuery message. + * Verifies a Dashboard message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSeriesQuery + * @returns Dashboard */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesQuery; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Dashboard; /** - * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. - * @param message TimeSeriesQuery + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @param message Dashboard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.Dashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSeriesQuery to JSON. + * Converts this Dashboard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSeriesFilter. */ - interface ITimeSeriesFilter { - - /** TimeSeriesFilter filter */ - filter?: (string|null); - - /** TimeSeriesFilter aggregation */ - aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** Properties of a GridLayout. */ + interface IGridLayout { - /** TimeSeriesFilter pickTimeSeriesFilter */ - pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** GridLayout columns */ + columns?: (number|Long|string|null); - /** TimeSeriesFilter statisticalTimeSeriesFilter */ - statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + /** GridLayout widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); } - /** Represents a TimeSeriesFilter. */ - class TimeSeriesFilter implements ITimeSeriesFilter { + /** Represents a GridLayout. */ + class GridLayout implements IGridLayout { /** - * Constructs a new TimeSeriesFilter. + * Constructs a new GridLayout. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter); - - /** TimeSeriesFilter filter. */ - public filter: string; - - /** TimeSeriesFilter aggregation. */ - public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - - /** TimeSeriesFilter pickTimeSeriesFilter. */ - public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); - /** TimeSeriesFilter statisticalTimeSeriesFilter. */ - public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + /** GridLayout columns. */ + public columns: (number|Long|string); - /** TimeSeriesFilter outputFilter. */ - public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + /** GridLayout widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; /** - * Creates a new TimeSeriesFilter instance using the specified properties. + * Creates a new GridLayout instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSeriesFilter instance + * @returns GridLayout instance */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter): google.monitoring.dashboard.v1.TimeSeriesFilter; + public static create(properties?: google.monitoring.dashboard.v1.IGridLayout): google.monitoring.dashboard.v1.GridLayout; /** - * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @param message TimeSeriesFilter message or plain object to encode + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @param message TimeSeriesFilter message or plain object to encode + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * Decodes a GridLayout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSeriesFilter + * @returns GridLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GridLayout; /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * Decodes a GridLayout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSeriesFilter + * @returns GridLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GridLayout; /** - * Verifies a TimeSeriesFilter message. + * Verifies a GridLayout message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSeriesFilter + * @returns GridLayout */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilter; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GridLayout; /** - * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. - * @param message TimeSeriesFilter + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @param message GridLayout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.GridLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSeriesFilter to JSON. + * Converts this GridLayout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSeriesFilterRatio. */ - interface ITimeSeriesFilterRatio { - - /** TimeSeriesFilterRatio numerator */ - numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - - /** TimeSeriesFilterRatio denominator */ - denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - - /** TimeSeriesFilterRatio secondaryAggregation */ - secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - - /** TimeSeriesFilterRatio pickTimeSeriesFilter */ - pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** Properties of a RowLayout. */ + interface IRowLayout { - /** TimeSeriesFilterRatio statisticalTimeSeriesFilter */ - statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + /** RowLayout rows */ + rows?: (google.monitoring.dashboard.v1.RowLayout.IRow[]|null); } - /** Represents a TimeSeriesFilterRatio. */ - class TimeSeriesFilterRatio implements ITimeSeriesFilterRatio { + /** Represents a RowLayout. */ + class RowLayout implements IRowLayout { /** - * Constructs a new TimeSeriesFilterRatio. + * Constructs a new RowLayout. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio); - - /** TimeSeriesFilterRatio numerator. */ - public numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - - /** TimeSeriesFilterRatio denominator. */ - public denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - - /** TimeSeriesFilterRatio secondaryAggregation. */ - public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - - /** TimeSeriesFilterRatio pickTimeSeriesFilter. */ - public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - - /** TimeSeriesFilterRatio statisticalTimeSeriesFilter. */ - public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + constructor(properties?: google.monitoring.dashboard.v1.IRowLayout); - /** TimeSeriesFilterRatio outputFilter. */ - public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + /** RowLayout rows. */ + public rows: google.monitoring.dashboard.v1.RowLayout.IRow[]; /** - * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * Creates a new RowLayout instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSeriesFilterRatio instance + * @returns RowLayout instance */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + public static create(properties?: google.monitoring.dashboard.v1.IRowLayout): google.monitoring.dashboard.v1.RowLayout; /** - * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @param message TimeSeriesFilterRatio message or plain object to encode + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @param message TimeSeriesFilterRatio message or plain object to encode + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * Decodes a RowLayout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSeriesFilterRatio + * @returns RowLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * Decodes a RowLayout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSeriesFilterRatio + * @returns RowLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout; /** - * Verifies a TimeSeriesFilterRatio message. + * Verifies a RowLayout message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSeriesFilterRatio + * @returns RowLayout */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout; /** - * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. - * @param message TimeSeriesFilterRatio + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @param message RowLayout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.RowLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSeriesFilterRatio to JSON. + * Converts this RowLayout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace TimeSeriesFilterRatio { + namespace RowLayout { - /** Properties of a RatioPart. */ - interface IRatioPart { + /** Properties of a Row. */ + interface IRow { - /** RatioPart filter */ - filter?: (string|null); + /** Row weight */ + weight?: (number|Long|string|null); - /** RatioPart aggregation */ - aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** Row widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); } - /** Represents a RatioPart. */ - class RatioPart implements IRatioPart { + /** Represents a Row. */ + class Row implements IRow { /** - * Constructs a new RatioPart. + * Constructs a new Row. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart); + constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); - /** RatioPart filter. */ - public filter: string; + /** Row weight. */ + public weight: (number|Long|string); - /** RatioPart aggregation. */ - public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** Row widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; /** - * Creates a new RatioPart instance using the specified properties. + * Creates a new Row instance using the specified properties. * @param [properties] Properties to set - * @returns RatioPart instance + * @returns Row instance */ - public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + public static create(properties?: google.monitoring.dashboard.v1.RowLayout.IRow): google.monitoring.dashboard.v1.RowLayout.Row; /** - * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @param message RatioPart message or plain object to encode + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @param message RatioPart message or plain object to encode + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RatioPart message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RatioPart + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout.Row; /** - * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RatioPart + * @returns Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout.Row; /** - * Verifies a RatioPart message. + * Verifies a Row message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RatioPart + * @returns Row */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout.Row; /** - * Creates a plain object from a RatioPart message. Also converts values to other types if specified. - * @param message RatioPart + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.RowLayout.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RatioPart to JSON. + * Converts this Row to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a Threshold. */ - interface IThreshold { - - /** Threshold label */ - label?: (string|null); - - /** Threshold value */ - value?: (number|null); - - /** Threshold color */ - color?: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color|null); + /** Properties of a ColumnLayout. */ + interface IColumnLayout { - /** Threshold direction */ - direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); + /** ColumnLayout columns */ + columns?: (google.monitoring.dashboard.v1.ColumnLayout.IColumn[]|null); } - /** Represents a Threshold. */ - class Threshold implements IThreshold { + /** Represents a ColumnLayout. */ + class ColumnLayout implements IColumnLayout { /** - * Constructs a new Threshold. + * Constructs a new ColumnLayout. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IThreshold); - - /** Threshold label. */ - public label: string; - - /** Threshold value. */ - public value: number; - - /** Threshold color. */ - public color: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color); + constructor(properties?: google.monitoring.dashboard.v1.IColumnLayout); - /** Threshold direction. */ - public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); + /** ColumnLayout columns. */ + public columns: google.monitoring.dashboard.v1.ColumnLayout.IColumn[]; /** - * Creates a new Threshold instance using the specified properties. + * Creates a new ColumnLayout instance using the specified properties. * @param [properties] Properties to set - * @returns Threshold instance + * @returns ColumnLayout instance */ - public static create(properties?: google.monitoring.dashboard.v1.IThreshold): google.monitoring.dashboard.v1.Threshold; + public static create(properties?: google.monitoring.dashboard.v1.IColumnLayout): google.monitoring.dashboard.v1.ColumnLayout; /** - * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @param message Threshold message or plain object to encode + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @param message Threshold message or plain object to encode + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Threshold message from the specified reader or buffer. + * Decodes a ColumnLayout message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Threshold + * @returns ColumnLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Threshold; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout; /** - * Decodes a Threshold message from the specified reader or buffer, length delimited. + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Threshold + * @returns ColumnLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Threshold; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout; /** - * Verifies a Threshold message. + * Verifies a ColumnLayout message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Threshold + * @returns ColumnLayout */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Threshold; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout; /** - * Creates a plain object from a Threshold message. Also converts values to other types if specified. - * @param message Threshold + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @param message ColumnLayout * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.Threshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Threshold to JSON. + * Converts this ColumnLayout to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Threshold { + namespace ColumnLayout { - /** Color enum. */ - enum Color { - COLOR_UNSPECIFIED = 0, - YELLOW = 4, - RED = 6 - } + /** Properties of a Column. */ + interface IColumn { - /** Direction enum. */ - enum Direction { - DIRECTION_UNSPECIFIED = 0, - ABOVE = 1, - BELOW = 2 - } - } + /** Column weight */ + weight?: (number|Long|string|null); - /** SparkChartType enum. */ - enum SparkChartType { - SPARK_CHART_TYPE_UNSPECIFIED = 0, - SPARK_LINE = 1, - SPARK_BAR = 2 - } + /** Column widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } - /** Properties of a Scorecard. */ - interface IScorecard { + /** Represents a Column. */ + class Column implements IColumn { - /** Scorecard timeSeriesQuery */ - timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** + * Constructs a new Column. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); - /** Scorecard gaugeView */ - gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + /** Column weight. */ + public weight: (number|Long|string); - /** Scorecard sparkChartView */ - sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + /** Column widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; - /** Scorecard thresholds */ - thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); - } + /** + * Creates a new Column instance using the specified properties. + * @param [properties] Properties to set + * @returns Column instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn): google.monitoring.dashboard.v1.ColumnLayout.Column; - /** Represents a Scorecard. */ - class Scorecard implements IScorecard { + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; - /** + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Column message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Verifies a Column message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Column + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout.Column; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @param message Column + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Column to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Widget. */ + interface IWidget { + + /** Widget title */ + title?: (string|null); + + /** Widget xyChart */ + xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + + /** Widget scorecard */ + scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + + /** Widget text */ + text?: (google.monitoring.dashboard.v1.IText|null); + + /** Widget blank */ + blank?: (google.protobuf.IEmpty|null); + } + + /** Represents a Widget. */ + class Widget implements IWidget { + + /** + * Constructs a new Widget. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IWidget); + + /** Widget title. */ + public title: string; + + /** Widget xyChart. */ + public xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + + /** Widget scorecard. */ + public scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + + /** Widget text. */ + public text?: (google.monitoring.dashboard.v1.IText|null); + + /** Widget blank. */ + public blank?: (google.protobuf.IEmpty|null); + + /** Widget content. */ + public content?: ("xyChart"|"scorecard"|"text"|"blank"); + + /** + * Creates a new Widget instance using the specified properties. + * @param [properties] Properties to set + * @returns Widget instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IWidget): google.monitoring.dashboard.v1.Widget; + + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Widget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Widget; + + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Widget; + + /** + * Verifies a Widget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Widget + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Widget; + + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @param message Widget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Widget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Widget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Scorecard. */ + interface IScorecard { + + /** Scorecard timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** Scorecard gaugeView */ + gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + + /** Scorecard sparkChartView */ + sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + + /** Scorecard thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + } + + /** Represents a Scorecard. */ + class Scorecard implements IScorecard { + + /** * Constructs a new Scorecard. * @param [properties] Properties to set */ @@ -4660,1276 +4810,1126 @@ export namespace google { } } - /** Properties of a Text. */ - interface IText { + /** Properties of a TimeSeriesQuery. */ + interface ITimeSeriesQuery { - /** Text content */ - content?: (string|null); + /** TimeSeriesQuery timeSeriesFilter */ + timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); - /** Text format */ - format?: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format|null); + /** TimeSeriesQuery timeSeriesFilterRatio */ + timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + + /** TimeSeriesQuery unitOverride */ + unitOverride?: (string|null); } - /** Represents a Text. */ - class Text implements IText { + /** Represents a TimeSeriesQuery. */ + class TimeSeriesQuery implements ITimeSeriesQuery { /** - * Constructs a new Text. + * Constructs a new TimeSeriesQuery. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IText); + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery); - /** Text content. */ - public content: string; + /** TimeSeriesQuery timeSeriesFilter. */ + public timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); - /** Text format. */ - public format: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format); + /** TimeSeriesQuery timeSeriesFilterRatio. */ + public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + + /** TimeSeriesQuery unitOverride. */ + public unitOverride: string; + + /** TimeSeriesQuery source. */ + public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"); /** - * Creates a new Text instance using the specified properties. + * Creates a new TimeSeriesQuery instance using the specified properties. * @param [properties] Properties to set - * @returns Text instance + * @returns TimeSeriesQuery instance */ - public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery): google.monitoring.dashboard.v1.TimeSeriesQuery; /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a TimeSeriesQuery message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Text + * @returns TimeSeriesQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesQuery; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Text + * @returns TimeSeriesQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesQuery; /** - * Verifies a Text message. + * Verifies a TimeSeriesQuery message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Text + * @returns TimeSeriesQuery */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesQuery; /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @param message Text + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @param message TimeSeriesQuery * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Text to JSON. + * Converts this TimeSeriesQuery to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Text { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - MARKDOWN = 1, - RAW = 2 - } - } - - /** Properties of a XyChart. */ - interface IXyChart { - - /** XyChart dataSets */ - dataSets?: (google.monitoring.dashboard.v1.XyChart.IDataSet[]|null); - - /** XyChart timeshiftDuration */ - timeshiftDuration?: (google.protobuf.IDuration|null); + /** Properties of a TimeSeriesFilter. */ + interface ITimeSeriesFilter { - /** XyChart thresholds */ - thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + /** TimeSeriesFilter filter */ + filter?: (string|null); - /** XyChart xAxis */ - xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** TimeSeriesFilter aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** XyChart yAxis */ - yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** TimeSeriesFilter pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** XyChart chartOptions */ - chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + /** TimeSeriesFilter statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); } - /** Represents a XyChart. */ - class XyChart implements IXyChart { + /** Represents a TimeSeriesFilter. */ + class TimeSeriesFilter implements ITimeSeriesFilter { /** - * Constructs a new XyChart. + * Constructs a new TimeSeriesFilter. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IXyChart); - - /** XyChart dataSets. */ - public dataSets: google.monitoring.dashboard.v1.XyChart.IDataSet[]; + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter); - /** XyChart timeshiftDuration. */ - public timeshiftDuration?: (google.protobuf.IDuration|null); + /** TimeSeriesFilter filter. */ + public filter: string; - /** XyChart thresholds. */ - public thresholds: google.monitoring.dashboard.v1.IThreshold[]; + /** TimeSeriesFilter aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** XyChart xAxis. */ - public xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** TimeSeriesFilter pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** XyChart yAxis. */ - public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** TimeSeriesFilter statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); - /** XyChart chartOptions. */ - public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + /** TimeSeriesFilter outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); /** - * Creates a new XyChart instance using the specified properties. + * Creates a new TimeSeriesFilter instance using the specified properties. * @param [properties] Properties to set - * @returns XyChart instance + * @returns TimeSeriesFilter instance */ - public static create(properties?: google.monitoring.dashboard.v1.IXyChart): google.monitoring.dashboard.v1.XyChart; + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter): google.monitoring.dashboard.v1.TimeSeriesFilter; /** - * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @param message XyChart message or plain object to encode + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @param message XyChart message or plain object to encode + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a XyChart message from the specified reader or buffer. + * Decodes a TimeSeriesFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns XyChart + * @returns TimeSeriesFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilter; /** - * Decodes a XyChart message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns XyChart + * @returns TimeSeriesFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilter; /** - * Verifies a XyChart message. + * Verifies a TimeSeriesFilter message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns XyChart + * @returns TimeSeriesFilter */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilter; /** - * Creates a plain object from a XyChart message. Also converts values to other types if specified. - * @param message XyChart + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. + * @param message TimeSeriesFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this XyChart to JSON. + * Converts this TimeSeriesFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace XyChart { + /** Properties of a TimeSeriesFilterRatio. */ + interface ITimeSeriesFilterRatio { - /** Properties of a DataSet. */ - interface IDataSet { + /** TimeSeriesFilterRatio numerator */ + numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** DataSet timeSeriesQuery */ - timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** TimeSeriesFilterRatio denominator */ + denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** DataSet plotType */ - plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); + /** TimeSeriesFilterRatio secondaryAggregation */ + secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** DataSet legendTemplate */ - legendTemplate?: (string|null); + /** TimeSeriesFilterRatio pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** DataSet minAlignmentPeriod */ - minAlignmentPeriod?: (google.protobuf.IDuration|null); - } + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + } - /** Represents a DataSet. */ - class DataSet implements IDataSet { + /** Represents a TimeSeriesFilterRatio. */ + class TimeSeriesFilterRatio implements ITimeSeriesFilterRatio { - /** - * Constructs a new DataSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet); + /** + * Constructs a new TimeSeriesFilterRatio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio); - /** DataSet timeSeriesQuery. */ - public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** TimeSeriesFilterRatio numerator. */ + public numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** DataSet plotType. */ - public plotType: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType); + /** TimeSeriesFilterRatio denominator. */ + public denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** DataSet legendTemplate. */ - public legendTemplate: string; + /** TimeSeriesFilterRatio secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** DataSet minAlignmentPeriod. */ - public minAlignmentPeriod?: (google.protobuf.IDuration|null); + /** TimeSeriesFilterRatio pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** - * Creates a new DataSet instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSet instance - */ - public static create(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet): google.monitoring.dashboard.v1.XyChart.DataSet; + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); - /** - * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @param message DataSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** TimeSeriesFilterRatio outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); - /** - * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @param message DataSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesFilterRatio instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** - * Decodes a DataSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.DataSet; + /** + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DataSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.DataSet; + /** + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a DataSet message. - * @param message 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 TimeSeriesFilterRatio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** - * Creates a DataSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSet - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.DataSet; + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** - * Creates a plain object from a DataSet message. Also converts values to other types if specified. - * @param message DataSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart.DataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a TimeSeriesFilterRatio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this DataSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesFilterRatio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - namespace DataSet { + /** + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * @param message TimeSeriesFilterRatio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PlotType enum. */ - enum PlotType { - PLOT_TYPE_UNSPECIFIED = 0, - LINE = 1, - STACKED_AREA = 2, - STACKED_BAR = 3, - HEATMAP = 4 - } - } + /** + * Converts this TimeSeriesFilterRatio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an Axis. */ - interface IAxis { + namespace TimeSeriesFilterRatio { - /** Axis label */ - label?: (string|null); + /** Properties of a RatioPart. */ + interface IRatioPart { - /** Axis scale */ - scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); + /** RatioPart filter */ + filter?: (string|null); + + /** RatioPart aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); } - /** Represents an Axis. */ - class Axis implements IAxis { + /** Represents a RatioPart. */ + class RatioPart implements IRatioPart { /** - * Constructs a new Axis. + * Constructs a new RatioPart. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.XyChart.IAxis); + constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart); - /** Axis label. */ - public label: string; + /** RatioPart filter. */ + public filter: string; - /** Axis scale. */ - public scale: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale); + /** RatioPart aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); /** - * Creates a new Axis instance using the specified properties. + * Creates a new RatioPart instance using the specified properties. * @param [properties] Properties to set - * @returns Axis instance + * @returns RatioPart instance */ - public static create(properties?: google.monitoring.dashboard.v1.XyChart.IAxis): google.monitoring.dashboard.v1.XyChart.Axis; + public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; /** - * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @param message Axis message or plain object to encode + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @param message Axis message or plain object to encode + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Axis message from the specified reader or buffer. + * Decodes a RatioPart message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Axis + * @returns RatioPart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.Axis; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; /** - * Decodes an Axis message from the specified reader or buffer, length delimited. + * Decodes a RatioPart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Axis + * @returns RatioPart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.Axis; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; /** - * Verifies an Axis message. + * Verifies a RatioPart message. * @param message Plain 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 Axis message from a plain object. Also converts values to their respective internal types. + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Axis + * @returns RatioPart */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.Axis; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; /** - * Creates a plain object from an Axis message. Also converts values to other types if specified. - * @param message Axis + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @param message RatioPart * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart.Axis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Axis to JSON. + * Converts this RatioPart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace Axis { + /** Properties of a Threshold. */ + interface IThreshold { - /** Scale enum. */ - enum Scale { - SCALE_UNSPECIFIED = 0, - LINEAR = 1, - LOG10 = 2 - } - } - } + /** Threshold label */ + label?: (string|null); - /** Properties of a ChartOptions. */ - interface IChartOptions { + /** Threshold value */ + value?: (number|null); - /** ChartOptions mode */ - mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode|null); + /** Threshold color */ + color?: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color|null); + + /** Threshold direction */ + direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); } - /** Represents a ChartOptions. */ - class ChartOptions implements IChartOptions { + /** Represents a Threshold. */ + class Threshold implements IThreshold { /** - * Constructs a new ChartOptions. + * Constructs a new Threshold. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); + constructor(properties?: google.monitoring.dashboard.v1.IThreshold); - /** ChartOptions mode. */ - public mode: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode); + /** Threshold label. */ + public label: string; + + /** Threshold value. */ + public value: number; + + /** Threshold color. */ + public color: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color); + + /** Threshold direction. */ + public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); /** - * Creates a new ChartOptions instance using the specified properties. + * Creates a new Threshold instance using the specified properties. * @param [properties] Properties to set - * @returns ChartOptions instance + * @returns Threshold instance */ - public static create(properties?: google.monitoring.dashboard.v1.IChartOptions): google.monitoring.dashboard.v1.ChartOptions; + public static create(properties?: google.monitoring.dashboard.v1.IThreshold): google.monitoring.dashboard.v1.Threshold; /** - * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @param message ChartOptions message or plain object to encode + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @param message ChartOptions message or plain object to encode + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChartOptions message from the specified reader or buffer. + * Decodes a Threshold message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChartOptions + * @returns Threshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ChartOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Threshold; /** - * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * Decodes a Threshold message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChartOptions + * @returns Threshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ChartOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Threshold; /** - * Verifies a ChartOptions message. + * Verifies a Threshold message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChartOptions + * @returns Threshold */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ChartOptions; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Threshold; /** - * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. - * @param message ChartOptions + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @param message Threshold * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.Threshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChartOptions to JSON. + * Converts this Threshold to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ChartOptions { + namespace Threshold { - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - COLOR = 1, - X_RAY = 2, - STATS = 3 + /** Color enum. */ + enum Color { + COLOR_UNSPECIFIED = 0, + YELLOW = 4, + RED = 6 } - } - - /** Properties of a Widget. */ - interface IWidget { - /** Widget title */ - title?: (string|null); + /** Direction enum. */ + enum Direction { + DIRECTION_UNSPECIFIED = 0, + ABOVE = 1, + BELOW = 2 + } + } - /** Widget xyChart */ - xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + /** SparkChartType enum. */ + enum SparkChartType { + SPARK_CHART_TYPE_UNSPECIFIED = 0, + SPARK_LINE = 1, + SPARK_BAR = 2 + } - /** Widget scorecard */ - scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + /** Properties of a Text. */ + interface IText { - /** Widget text */ - text?: (google.monitoring.dashboard.v1.IText|null); + /** Text content */ + content?: (string|null); - /** Widget blank */ - blank?: (google.protobuf.IEmpty|null); + /** Text format */ + format?: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format|null); } - /** Represents a Widget. */ - class Widget implements IWidget { + /** Represents a Text. */ + class Text implements IText { /** - * Constructs a new Widget. + * Constructs a new Text. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IWidget); - - /** Widget title. */ - public title: string; - - /** Widget xyChart. */ - public xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); - - /** Widget scorecard. */ - public scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); - - /** Widget text. */ - public text?: (google.monitoring.dashboard.v1.IText|null); + constructor(properties?: google.monitoring.dashboard.v1.IText); - /** Widget blank. */ - public blank?: (google.protobuf.IEmpty|null); + /** Text content. */ + public content: string; - /** Widget content. */ - public content?: ("xyChart"|"scorecard"|"text"|"blank"); + /** Text format. */ + public format: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format); /** - * Creates a new Widget instance using the specified properties. + * Creates a new Text instance using the specified properties. * @param [properties] Properties to set - * @returns Widget instance + * @returns Text instance */ - public static create(properties?: google.monitoring.dashboard.v1.IWidget): google.monitoring.dashboard.v1.Widget; + public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; /** - * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @param message Widget message or plain object to encode + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @param message Widget message or plain object to encode + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Widget message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Widget + * @returns Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Widget; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; /** - * Decodes a Widget message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Widget + * @returns Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Widget; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; /** - * Verifies a Widget message. + * Verifies a Text message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Widget + * @returns Text */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Widget; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; /** - * Creates a plain object from a Widget message. Also converts values to other types if specified. - * @param message Widget + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.Widget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Widget to JSON. + * Converts this Text to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GridLayout. */ - interface IGridLayout { - - /** GridLayout columns */ - columns?: (number|Long|string|null); + namespace Text { - /** GridLayout widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + MARKDOWN = 1, + RAW = 2 + } } - /** Represents a GridLayout. */ - class GridLayout implements IGridLayout { - - /** - * Constructs a new GridLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); - - /** GridLayout columns. */ - public columns: (number|Long|string); - - /** GridLayout widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** Properties of a XyChart. */ + interface IXyChart { - /** - * Creates a new GridLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns GridLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IGridLayout): google.monitoring.dashboard.v1.GridLayout; + /** XyChart dataSets */ + dataSets?: (google.monitoring.dashboard.v1.XyChart.IDataSet[]|null); - /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @param message GridLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** XyChart timeshiftDuration */ + timeshiftDuration?: (google.protobuf.IDuration|null); - /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @param message GridLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** XyChart thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); - /** - * Decodes a GridLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GridLayout; + /** XyChart xAxis */ + xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GridLayout; + /** XyChart yAxis */ + yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** - * Verifies a GridLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** XyChart chartOptions */ + chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + } - /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GridLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GridLayout; + /** Represents a XyChart. */ + class XyChart implements IXyChart { /** - * Creates a plain object from a GridLayout message. Also converts values to other types if specified. - * @param message GridLayout - * @param [options] Conversion options - * @returns Plain object + * Constructs a new XyChart. + * @param [properties] Properties to set */ - public static toObject(message: google.monitoring.dashboard.v1.GridLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + constructor(properties?: google.monitoring.dashboard.v1.IXyChart); - /** - * Converts this GridLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** XyChart dataSets. */ + public dataSets: google.monitoring.dashboard.v1.XyChart.IDataSet[]; - /** Properties of a RowLayout. */ - interface IRowLayout { + /** XyChart timeshiftDuration. */ + public timeshiftDuration?: (google.protobuf.IDuration|null); - /** RowLayout rows */ - rows?: (google.monitoring.dashboard.v1.RowLayout.IRow[]|null); - } + /** XyChart thresholds. */ + public thresholds: google.monitoring.dashboard.v1.IThreshold[]; - /** Represents a RowLayout. */ - class RowLayout implements IRowLayout { + /** XyChart xAxis. */ + public xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** - * Constructs a new RowLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IRowLayout); + /** XyChart yAxis. */ + public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** RowLayout rows. */ - public rows: google.monitoring.dashboard.v1.RowLayout.IRow[]; + /** XyChart chartOptions. */ + public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); /** - * Creates a new RowLayout instance using the specified properties. + * Creates a new XyChart instance using the specified properties. * @param [properties] Properties to set - * @returns RowLayout instance + * @returns XyChart instance */ - public static create(properties?: google.monitoring.dashboard.v1.IRowLayout): google.monitoring.dashboard.v1.RowLayout; + public static create(properties?: google.monitoring.dashboard.v1.IXyChart): google.monitoring.dashboard.v1.XyChart; /** - * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. - * @param message RowLayout message or plain object to encode + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. - * @param message RowLayout message or plain object to encode + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RowLayout message from the specified reader or buffer. + * Decodes a XyChart message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RowLayout + * @returns XyChart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart; /** - * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * Decodes a XyChart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RowLayout + * @returns XyChart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart; /** - * Verifies a RowLayout message. + * Verifies a XyChart message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RowLayout + * @returns XyChart */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart; /** - * Creates a plain object from a RowLayout message. Also converts values to other types if specified. - * @param message RowLayout + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @param message XyChart * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.RowLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.XyChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RowLayout to JSON. + * Converts this XyChart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace RowLayout { + namespace XyChart { - /** Properties of a Row. */ - interface IRow { + /** Properties of a DataSet. */ + interface IDataSet { - /** Row weight */ - weight?: (number|Long|string|null); + /** DataSet timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** Row widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + /** DataSet plotType */ + plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); + + /** DataSet legendTemplate */ + legendTemplate?: (string|null); + + /** DataSet minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); } - /** Represents a Row. */ - class Row implements IRow { + /** Represents a DataSet. */ + class DataSet implements IDataSet { /** - * Constructs a new Row. + * Constructs a new DataSet. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet); - /** Row weight. */ - public weight: (number|Long|string); + /** DataSet timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** Row widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** DataSet plotType. */ + public plotType: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType); + + /** DataSet legendTemplate. */ + public legendTemplate: string; + + /** DataSet minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); /** - * Creates a new Row instance using the specified properties. + * Creates a new DataSet instance using the specified properties. * @param [properties] Properties to set - * @returns Row instance + * @returns DataSet instance */ - public static create(properties?: google.monitoring.dashboard.v1.RowLayout.IRow): google.monitoring.dashboard.v1.RowLayout.Row; + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet): google.monitoring.dashboard.v1.XyChart.DataSet; /** - * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @param message Row message or plain object to encode + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a DataSet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Row + * @returns DataSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout.Row; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.DataSet; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a DataSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Row + * @returns DataSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout.Row; - - /** - * Verifies a Row message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout.Row; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.RowLayout.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ColumnLayout. */ - interface IColumnLayout { - - /** ColumnLayout columns */ - columns?: (google.monitoring.dashboard.v1.ColumnLayout.IColumn[]|null); - } - - /** Represents a ColumnLayout. */ - class ColumnLayout implements IColumnLayout { - - /** - * Constructs a new ColumnLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IColumnLayout); - - /** ColumnLayout columns. */ - public columns: google.monitoring.dashboard.v1.ColumnLayout.IColumn[]; - - /** - * Creates a new ColumnLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IColumnLayout): google.monitoring.dashboard.v1.ColumnLayout; - - /** - * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @param message ColumnLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @param message ColumnLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ColumnLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout; - - /** - * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout; + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.DataSet; - /** - * Verifies a ColumnLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a DataSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout; + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSet + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.DataSet; - /** - * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. - * @param message ColumnLayout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @param message DataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart.DataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ColumnLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this DataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - namespace ColumnLayout { + namespace DataSet { - /** Properties of a Column. */ - interface IColumn { + /** PlotType enum. */ + enum PlotType { + PLOT_TYPE_UNSPECIFIED = 0, + LINE = 1, + STACKED_AREA = 2, + STACKED_BAR = 3, + HEATMAP = 4 + } + } - /** Column weight */ - weight?: (number|Long|string|null); + /** Properties of an Axis. */ + interface IAxis { - /** Column widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + /** Axis label */ + label?: (string|null); + + /** Axis scale */ + scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); } - /** Represents a Column. */ - class Column implements IColumn { + /** Represents an Axis. */ + class Axis implements IAxis { /** - * Constructs a new Column. + * Constructs a new Axis. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IAxis); - /** Column weight. */ - public weight: (number|Long|string); + /** Axis label. */ + public label: string; - /** Column widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** Axis scale. */ + public scale: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale); /** - * Creates a new Column instance using the specified properties. + * Creates a new Axis instance using the specified properties. * @param [properties] Properties to set - * @returns Column instance + * @returns Axis instance */ - public static create(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn): google.monitoring.dashboard.v1.ColumnLayout.Column; + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IAxis): google.monitoring.dashboard.v1.XyChart.Axis; /** - * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @param message Column message or plain object to encode + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @param message Column message or plain object to encode + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Column message from the specified reader or buffer. + * Decodes an Axis message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Column + * @returns Axis * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout.Column; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.Axis; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes an Axis message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Column + * @returns Axis * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout.Column; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.Axis; /** - * Verifies a Column message. + * Verifies an Axis message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. + * Creates an Axis message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Column + * @returns Axis */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout.Column; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.Axis; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @param message Column + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @param message Axis * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.XyChart.Axis, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Column to JSON. + * Converts this Axis to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** Properties of a Dashboard. */ - interface IDashboard { - - /** Dashboard name */ - name?: (string|null); - - /** Dashboard displayName */ - displayName?: (string|null); - /** Dashboard etag */ - etag?: (string|null); + namespace Axis { - /** Dashboard gridLayout */ - gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + /** Scale enum. */ + enum Scale { + SCALE_UNSPECIFIED = 0, + LINEAR = 1, + LOG10 = 2 + } + } + } - /** Dashboard rowLayout */ - rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + /** Properties of a ChartOptions. */ + interface IChartOptions { - /** Dashboard columnLayout */ - columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + /** ChartOptions mode */ + mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode|null); } - /** Represents a Dashboard. */ - class Dashboard implements IDashboard { + /** Represents a ChartOptions. */ + class ChartOptions implements IChartOptions { /** - * Constructs a new Dashboard. + * Constructs a new ChartOptions. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IDashboard); - - /** Dashboard name. */ - public name: string; - - /** Dashboard displayName. */ - public displayName: string; - - /** Dashboard etag. */ - public etag: string; - - /** Dashboard gridLayout. */ - public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); - - /** Dashboard rowLayout. */ - public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); - - /** Dashboard columnLayout. */ - public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); - /** Dashboard layout. */ - public layout?: ("gridLayout"|"rowLayout"|"columnLayout"); + /** ChartOptions mode. */ + public mode: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode); /** - * Creates a new Dashboard instance using the specified properties. + * Creates a new ChartOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Dashboard instance + * @returns ChartOptions instance */ - public static create(properties?: google.monitoring.dashboard.v1.IDashboard): google.monitoring.dashboard.v1.Dashboard; + public static create(properties?: google.monitoring.dashboard.v1.IChartOptions): google.monitoring.dashboard.v1.ChartOptions; /** - * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @param message Dashboard message or plain object to encode + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @param message Dashboard message or plain object to encode + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Dashboard message from the specified reader or buffer. + * Decodes a ChartOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Dashboard + * @returns ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Dashboard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ChartOptions; /** - * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Dashboard + * @returns ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Dashboard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ChartOptions; /** - * Verifies a Dashboard message. + * Verifies a ChartOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Dashboard + * @returns ChartOptions */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Dashboard; + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ChartOptions; /** - * Creates a plain object from a Dashboard message. Also converts values to other types if specified. - * @param message Dashboard + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @param message ChartOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.Dashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.dashboard.v1.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Dashboard to JSON. + * Converts this ChartOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + namespace ChartOptions { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + COLOR = 1, + X_RAY = 2, + STATS = 3 + } + } + /** Represents a DashboardsService */ class DashboardsService extends $protobuf.rpc.Service { diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 955c8e77ec6..989dd4087d1 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -10311,26 +10311,29 @@ return StatisticalTimeSeriesFilter; })(); - v1.TimeSeriesQuery = (function() { + v1.Dashboard = (function() { /** - * Properties of a TimeSeriesQuery. + * Properties of a Dashboard. * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesQuery - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio - * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride + * @interface IDashboard + * @property {string|null} [name] Dashboard name + * @property {string|null} [displayName] Dashboard displayName + * @property {string|null} [etag] Dashboard etag + * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout + * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout + * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout */ /** - * Constructs a new TimeSeriesQuery. + * Constructs a new Dashboard. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesQuery. - * @implements ITimeSeriesQuery + * @classdesc Represents a Dashboard. + * @implements IDashboard * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set */ - function TimeSeriesQuery(properties) { + function Dashboard(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10338,115 +10341,154 @@ } /** - * TimeSeriesQuery timeSeriesFilter. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * Dashboard name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.Dashboard * @instance */ - TimeSeriesQuery.prototype.timeSeriesFilter = null; + Dashboard.prototype.name = ""; /** - * TimeSeriesQuery timeSeriesFilterRatio. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * Dashboard displayName. + * @member {string} displayName + * @memberof google.monitoring.dashboard.v1.Dashboard * @instance */ - TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; + Dashboard.prototype.displayName = ""; /** - * TimeSeriesQuery unitOverride. - * @member {string} unitOverride - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * Dashboard etag. + * @member {string} etag + * @memberof google.monitoring.dashboard.v1.Dashboard * @instance */ - TimeSeriesQuery.prototype.unitOverride = ""; + Dashboard.prototype.etag = ""; + + /** + * Dashboard gridLayout. + * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.gridLayout = null; + + /** + * Dashboard rowLayout. + * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.rowLayout = null; + + /** + * Dashboard columnLayout. + * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.columnLayout = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * TimeSeriesQuery source. - * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|undefined} source - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * Dashboard layout. + * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout + * @memberof google.monitoring.dashboard.v1.Dashboard * @instance */ - Object.defineProperty(TimeSeriesQuery.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio"]), + Object.defineProperty(Dashboard.prototype, "layout", { + get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TimeSeriesQuery instance using the specified properties. + * Creates a new Dashboard instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance */ - TimeSeriesQuery.create = function create(properties) { - return new TimeSeriesQuery(properties); + Dashboard.create = function create(properties) { + return new Dashboard(properties); }; /** - * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesQuery.encode = function encode(message, writer) { + Dashboard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.etag != null && message.hasOwnProperty("etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) + $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) + $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) + $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { + Dashboard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * Decodes a Dashboard message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesQuery.decode = function decode(reader, length) { + Dashboard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 4: + message.etag = reader.string(); break; case 5: - message.unitOverride = reader.string(); + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); + break; + case 8: + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); + break; + case 9: + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10457,149 +10499,185 @@ }; /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * Decodes a Dashboard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { + Dashboard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeriesQuery message. + * Verifies a Dashboard message. * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeriesQuery.verify = function verify(message) { + Dashboard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - properties.source = 1; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + properties.layout = 1; { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); + var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); if (error) - return "timeSeriesFilter." + error; + return "gridLayout." + error; } } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); + var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); if (error) - return "timeSeriesFilterRatio." + error; + return "rowLayout." + error; + } + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); + if (error) + return "columnLayout." + error; } } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - if (!$util.isString(message.unitOverride)) - return "unitOverride: string expected"; return null; }; /** - * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard */ - TimeSeriesQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) + Dashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); - if (object.timeSeriesFilter != null) { - if (typeof object.timeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); + var message = new $root.google.monitoring.dashboard.v1.Dashboard(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.etag != null) + message.etag = String(object.etag); + if (object.gridLayout != null) { + if (typeof object.gridLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); } - if (object.timeSeriesFilterRatio != null) { - if (typeof object.timeSeriesFilterRatio !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); + if (object.rowLayout != null) { + if (typeof object.rowLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); + } + if (object.columnLayout != null) { + if (typeof object.columnLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); } - if (object.unitOverride != null) - message.unitOverride = String(object.unitOverride); return message; }; /** - * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery + * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeriesQuery.toObject = function toObject(message, options) { + Dashboard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.unitOverride = ""; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); if (options.oneofs) - object.source = "timeSeriesFilter"; + object.layout = "gridLayout"; } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); if (options.oneofs) - object.source = "timeSeriesFilterRatio"; + object.layout = "rowLayout"; + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); + if (options.oneofs) + object.layout = "columnLayout"; } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - object.unitOverride = message.unitOverride; return object; }; /** - * Converts this TimeSeriesQuery to JSON. + * Converts this Dashboard to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Dashboard * @instance * @returns {Object.} JSON object */ - TimeSeriesQuery.prototype.toJSON = function toJSON() { + Dashboard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSeriesQuery; + return Dashboard; })(); - v1.TimeSeriesFilter = (function() { + v1.GridLayout = (function() { /** - * Properties of a TimeSeriesFilter. + * Properties of a GridLayout. * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilter - * @property {string|null} [filter] TimeSeriesFilter filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets */ /** - * Constructs a new TimeSeriesFilter. + * Constructs a new GridLayout. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilter. - * @implements ITimeSeriesFilter + * @classdesc Represents a GridLayout. + * @implements IGridLayout * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set */ - function TimeSeriesFilter(properties) { + function GridLayout(properties) { + this.widgets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10607,128 +10685,91 @@ } /** - * TimeSeriesFilter filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.filter = ""; - - /** - * TimeSeriesFilter aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.aggregation = null; - - /** - * TimeSeriesFilter pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; - - /** - * TimeSeriesFilter statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout * @instance */ - TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * TimeSeriesFilter outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout * @instance */ - Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + GridLayout.prototype.widgets = $util.emptyArray; /** - * Creates a new TimeSeriesFilter instance using the specified properties. + * Creates a new GridLayout instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance */ - TimeSeriesFilter.create = function create(properties) { - return new TimeSeriesFilter(properties); + GridLayout.create = function create(properties) { + return new GridLayout(properties); }; /** - * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilter.encode = function encode(message, writer) { + GridLayout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.columns != null && message.hasOwnProperty("columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + GridLayout.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * Decodes a GridLayout message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilter.decode = function decode(reader, length) { + GridLayout.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.filter = reader.string(); + message.columns = reader.int64(); break; case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -10739,164 +10780,148 @@ }; /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * Decodes a GridLayout message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + GridLayout.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeriesFilter message. + * Verifies a GridLayout message. * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeriesFilter.verify = function verify(message) { + GridLayout.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); if (error) - return "statisticalTimeSeriesFilter." + error; + return "widgets." + error; } } return null; }; /** - * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout */ - TimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); - } - return message; - }; - - /** - * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + else if (typeof object.columns === "string") + message.columns = parseInt(object.columns, 10); + else if (typeof object.columns === "number") + message.columns = object.columns; + else if (typeof object.columns === "object") + message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GridLayout * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter + * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeriesFilter.toObject = function toObject(message, options) { + GridLayout.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.columns = options.longs === String ? "0" : 0; + if (message.columns != null && message.hasOwnProperty("columns")) + if (typeof message.columns === "number") + object.columns = options.longs === String ? String(message.columns) : message.columns; + else + object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); } return object; }; /** - * Converts this TimeSeriesFilter to JSON. + * Converts this GridLayout to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.GridLayout * @instance * @returns {Object.} JSON object */ - TimeSeriesFilter.prototype.toJSON = function toJSON() { + GridLayout.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSeriesFilter; + return GridLayout; })(); - v1.TimeSeriesFilterRatio = (function() { + v1.RowLayout = (function() { /** - * Properties of a TimeSeriesFilterRatio. + * Properties of a RowLayout. * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilterRatio - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator - * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter + * @interface IRowLayout + * @property {Array.|null} [rows] RowLayout rows */ /** - * Constructs a new TimeSeriesFilterRatio. + * Constructs a new RowLayout. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilterRatio. - * @implements ITimeSeriesFilterRatio + * @classdesc Represents a RowLayout. + * @implements IRowLayout * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set */ - function TimeSeriesFilterRatio(properties) { + function RowLayout(properties) { + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10904,141 +10929,78 @@ } /** - * TimeSeriesFilterRatio numerator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.numerator = null; - - /** - * TimeSeriesFilterRatio denominator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.denominator = null; - - /** - * TimeSeriesFilterRatio secondaryAggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.secondaryAggregation = null; - - /** - * TimeSeriesFilterRatio pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; - - /** - * TimeSeriesFilterRatio statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TimeSeriesFilterRatio outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * RowLayout rows. + * @member {Array.} rows + * @memberof google.monitoring.dashboard.v1.RowLayout * @instance */ - Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + RowLayout.prototype.rows = $util.emptyArray; /** - * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * Creates a new RowLayout instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance */ - TimeSeriesFilterRatio.create = function create(properties) { - return new TimeSeriesFilterRatio(properties); + RowLayout.create = function create(properties) { + return new RowLayout(properties); }; /** - * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilterRatio.encode = function encode(message, writer) { + RowLayout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numerator != null && message.hasOwnProperty("numerator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denominator != null && message.hasOwnProperty("denominator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { + RowLayout.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * Decodes a RowLayout message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilterRatio.decode = function decode(reader, length) { + RowLayout.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 2: - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -11049,176 +11011,123 @@ }; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * Decodes a RowLayout message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { + RowLayout.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeriesFilterRatio message. + * Verifies a RowLayout message. * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeriesFilterRatio.verify = function verify(message) { + RowLayout.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.numerator != null && message.hasOwnProperty("numerator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); - if (error) - return "numerator." + error; - } - if (message.denominator != null && message.hasOwnProperty("denominator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); - if (error) - return "denominator." + error; - } - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); - if (error) - return "secondaryAggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); - if (error) - return "statisticalTimeSeriesFilter." + error; - } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } } return null; }; /** - * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout */ - TimeSeriesFilterRatio.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) + RowLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); - if (object.numerator != null) { - if (typeof object.numerator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); - } - if (object.denominator != null) { - if (typeof object.denominator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); - } - if (object.secondaryAggregation != null) { - if (typeof object.secondaryAggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + var message = new $root.google.monitoring.dashboard.v1.RowLayout(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); + message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); + } } return message; }; /** - * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio + * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeriesFilterRatio.toObject = function toObject(message, options) { + RowLayout.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.numerator = null; - object.denominator = null; - object.secondaryAggregation = null; - } - if (message.numerator != null && message.hasOwnProperty("numerator")) - object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); - if (message.denominator != null && message.hasOwnProperty("denominator")) - object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) - object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); } return object; }; /** - * Converts this TimeSeriesFilterRatio to JSON. + * Converts this RowLayout to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.RowLayout * @instance * @returns {Object.} JSON object */ - TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { + RowLayout.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TimeSeriesFilterRatio.RatioPart = (function() { + RowLayout.Row = (function() { /** - * Properties of a RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @interface IRatioPart - * @property {string|null} [filter] RatioPart filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation + * Properties of a Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @interface IRow + * @property {number|Long|null} [weight] Row weight + * @property {Array.|null} [widgets] Row widgets */ /** - * Constructs a new RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @classdesc Represents a RatioPart. - * @implements IRatioPart + * Constructs a new Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set */ - function RatioPart(properties) { + function Row(properties) { + this.widgets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11226,88 +11135,91 @@ } /** - * RatioPart filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * Row weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @instance */ - RatioPart.prototype.filter = ""; + Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * RatioPart aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * Row widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @instance */ - RatioPart.prototype.aggregation = null; + Row.prototype.widgets = $util.emptyArray; /** - * Creates a new RatioPart instance using the specified properties. + * Creates a new Row instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance */ - RatioPart.create = function create(properties) { - return new RatioPart(properties); + Row.create = function create(properties) { + return new Row(properties); }; /** - * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RatioPart.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.weight != null && message.hasOwnProperty("weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RatioPart.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RatioPart message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RatioPart.decode = function decode(reader, length) { + Row.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.filter = reader.string(); + message.weight = reader.int64(); break; case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -11318,127 +11230,151 @@ }; /** - * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RatioPart.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RatioPart message. + * Verifies a Row message. * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RatioPart.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } } return null; }; /** - * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row */ - RatioPart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - return message; - }; - - /** - * Creates a plain object from a RatioPart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart - * @param {$protobuf.IConversionOptions} [options] Conversion options + var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RatioPart.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); return object; }; /** - * Converts this RatioPart to JSON. + * Converts this Row to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @memberof google.monitoring.dashboard.v1.RowLayout.Row * @instance * @returns {Object.} JSON object */ - RatioPart.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RatioPart; + return Row; })(); - return TimeSeriesFilterRatio; + return RowLayout; })(); - v1.Threshold = (function() { + v1.ColumnLayout = (function() { /** - * Properties of a Threshold. + * Properties of a ColumnLayout. * @memberof google.monitoring.dashboard.v1 - * @interface IThreshold - * @property {string|null} [label] Threshold label - * @property {number|null} [value] Threshold value - * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color - * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + * @interface IColumnLayout + * @property {Array.|null} [columns] ColumnLayout columns */ /** - * Constructs a new Threshold. + * Constructs a new ColumnLayout. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Threshold. - * @implements IThreshold + * @classdesc Represents a ColumnLayout. + * @implements IColumnLayout * @constructor - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set */ - function Threshold(properties) { + function ColumnLayout(properties) { + this.columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11446,114 +11382,78 @@ } /** - * Threshold label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.label = ""; - - /** - * Threshold value. - * @member {number} value - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.value = 0; - - /** - * Threshold color. - * @member {google.monitoring.dashboard.v1.Threshold.Color} color - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.color = 0; - - /** - * Threshold direction. - * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction - * @memberof google.monitoring.dashboard.v1.Threshold + * ColumnLayout columns. + * @member {Array.} columns + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @instance */ - Threshold.prototype.direction = 0; + ColumnLayout.prototype.columns = $util.emptyArray; /** - * Creates a new Threshold instance using the specified properties. + * Creates a new ColumnLayout instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance */ - Threshold.create = function create(properties) { - return new Threshold(properties); + ColumnLayout.create = function create(properties) { + return new ColumnLayout(properties); }; /** - * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Threshold.encode = function encode(message, writer) { + ColumnLayout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.value != null && message.hasOwnProperty("value")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - if (message.color != null && message.hasOwnProperty("color")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); - if (message.direction != null && message.hasOwnProperty("direction")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Threshold.encodeDelimited = function encodeDelimited(message, writer) { + ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Threshold message from the specified reader or buffer. + * Decodes a ColumnLayout message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Threshold.decode = function decode(reader, length) { + ColumnLayout.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.label = reader.string(); - break; - case 2: - message.value = reader.double(); - break; - case 3: - message.color = reader.int32(); - break; - case 4: - message.direction = reader.int32(); + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -11564,352 +11464,515 @@ }; /** - * Decodes a Threshold message from the specified reader or buffer, length delimited. + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Threshold.decodeDelimited = function decodeDelimited(reader) { + ColumnLayout.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Threshold message. + * Verifies a ColumnLayout message. * @function verify - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Threshold.verify = function verify(message) { + ColumnLayout.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.color != null && message.hasOwnProperty("color")) - switch (message.color) { - default: - return "color: enum value expected"; - case 0: - case 4: - case 6: - break; - } - if (message.direction != null && message.hasOwnProperty("direction")) - switch (message.direction) { - default: - return "direction: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); + if (error) + return "columns." + error; } + } return null; }; /** - * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout */ - Threshold.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) + ColumnLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) return object; - var message = new $root.google.monitoring.dashboard.v1.Threshold(); - if (object.label != null) - message.label = String(object.label); - if (object.value != null) - message.value = Number(object.value); - switch (object.color) { - case "COLOR_UNSPECIFIED": - case 0: - message.color = 0; - break; - case "YELLOW": - case 4: - message.color = 4; - break; - case "RED": - case 6: - message.color = 6; - break; - } - switch (object.direction) { - case "DIRECTION_UNSPECIFIED": - case 0: - message.direction = 0; - break; - case "ABOVE": - case 1: - message.direction = 1; - break; - case "BELOW": - case 2: - message.direction = 2; - break; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); + message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); + } } return message; }; /** - * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @static - * @param {google.monitoring.dashboard.v1.Threshold} message Threshold + * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Threshold.toObject = function toObject(message, options) { + ColumnLayout.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.label = ""; - object.value = 0; - object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; - object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.color != null && message.hasOwnProperty("color")) - object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; return object; }; /** - * Converts this Threshold to JSON. + * Converts this ColumnLayout to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.ColumnLayout * @instance * @returns {Object.} JSON object */ - Threshold.prototype.toJSON = function toJSON() { + ColumnLayout.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Color enum. - * @name google.monitoring.dashboard.v1.Threshold.Color - * @enum {string} - * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value - * @property {number} YELLOW=4 YELLOW value - * @property {number} RED=6 RED value - */ - Threshold.Color = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; - values[valuesById[4] = "YELLOW"] = 4; - values[valuesById[6] = "RED"] = 6; - return values; - })(); + ColumnLayout.Column = (function() { - /** - * Direction enum. - * @name google.monitoring.dashboard.v1.Threshold.Direction - * @enum {string} - * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value - * @property {number} ABOVE=1 ABOVE value - * @property {number} BELOW=2 BELOW value - */ - Threshold.Direction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ABOVE"] = 1; - values[valuesById[2] = "BELOW"] = 2; - return values; - })(); + /** + * Properties of a Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @interface IColumn + * @property {number|Long|null} [weight] Column weight + * @property {Array.|null} [widgets] Column widgets + */ - return Threshold; - })(); + /** + * Constructs a new Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + */ + function Column(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SparkChartType enum. - * @name google.monitoring.dashboard.v1.SparkChartType - * @enum {string} - * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value - * @property {number} SPARK_LINE=1 SPARK_LINE value - * @property {number} SPARK_BAR=2 SPARK_BAR value - */ - v1.SparkChartType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_LINE"] = 1; - values[valuesById[2] = "SPARK_BAR"] = 2; - return values; - })(); + /** + * Column weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - v1.Scorecard = (function() { + /** + * Column widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.widgets = $util.emptyArray; - /** - * Properties of a Scorecard. - * @memberof google.monitoring.dashboard.v1 - * @interface IScorecard - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery - * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView - * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView - * @property {Array.|null} [thresholds] Scorecard thresholds - */ + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; - /** - * Constructs a new Scorecard. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Scorecard. - * @implements IScorecard - * @constructor - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set - */ - function Scorecard(properties) { - this.thresholds = []; - if (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 Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && message.hasOwnProperty("weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Scorecard timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.timeSeriesQuery = null; + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Scorecard gaugeView. - * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.gaugeView = null; + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Scorecard sparkChartView. - * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView - * @memberof google.monitoring.dashboard.v1.Scorecard + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Column message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + */ + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Column; + })(); + + return ColumnLayout; + })(); + + v1.Widget = (function() { + + /** + * Properties of a Widget. + * @memberof google.monitoring.dashboard.v1 + * @interface IWidget + * @property {string|null} [title] Widget title + * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart + * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard + * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text + * @property {google.protobuf.IEmpty|null} [blank] Widget blank + */ + + /** + * Constructs a new Widget. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Widget. + * @implements IWidget + * @constructor + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + */ + function Widget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Widget title. + * @member {string} title + * @memberof google.monitoring.dashboard.v1.Widget * @instance */ - Scorecard.prototype.sparkChartView = null; + Widget.prototype.title = ""; /** - * Scorecard thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.Scorecard + * Widget xyChart. + * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart + * @memberof google.monitoring.dashboard.v1.Widget * @instance */ - Scorecard.prototype.thresholds = $util.emptyArray; + Widget.prototype.xyChart = null; + + /** + * Widget scorecard. + * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.scorecard = null; + + /** + * Widget text. + * @member {google.monitoring.dashboard.v1.IText|null|undefined} text + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.text = null; + + /** + * Widget blank. + * @member {google.protobuf.IEmpty|null|undefined} blank + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.blank = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Scorecard dataView. - * @member {"gaugeView"|"sparkChartView"|undefined} dataView - * @memberof google.monitoring.dashboard.v1.Scorecard + * Widget content. + * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content + * @memberof google.monitoring.dashboard.v1.Widget * @instance */ - Object.defineProperty(Scorecard.prototype, "dataView", { - get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), + Object.defineProperty(Widget.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Scorecard instance using the specified properties. + * Creates a new Widget instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Widget} Widget instance */ - Scorecard.create = function create(properties) { - return new Scorecard(properties); + Widget.create = function create(properties) { + return new Widget(properties); }; /** - * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Scorecard.encode = function encode(message, writer) { + Widget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) - $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) - $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.thresholds != null && message.thresholds.length) - for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.title != null && message.hasOwnProperty("title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.xyChart != null && message.hasOwnProperty("xyChart")) + $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.scorecard != null && message.hasOwnProperty("scorecard")) + $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.text != null && message.hasOwnProperty("text")) + $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.blank != null && message.hasOwnProperty("blank")) + $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Scorecard.encodeDelimited = function encodeDelimited(message, writer) { + Widget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Scorecard message from the specified reader or buffer. + * Decodes a Widget message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @returns {google.monitoring.dashboard.v1.Widget} Widget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Scorecard.decode = function decode(reader, length) { + Widget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + message.title = reader.string(); + break; + case 2: + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + break; + case 3: + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); break; case 4: - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); + message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); break; case 5: - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11920,1019 +11983,323 @@ }; /** - * Decodes a Scorecard message from the specified reader or buffer, length delimited. + * Decodes a Widget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @returns {google.monitoring.dashboard.v1.Widget} Widget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Scorecard.decodeDelimited = function decodeDelimited(reader) { + Widget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Scorecard message. + * Verifies a Widget message. * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Scorecard.verify = function verify(message) { + Widget.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); + if (error) + return "xyChart." + error; + } } - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - properties.dataView = 1; + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; { - var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); + var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); if (error) - return "gaugeView." + error; + return "scorecard." + error; } } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - if (properties.dataView === 1) - return "dataView: multiple values"; - properties.dataView = 1; + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; { - var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); + var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); if (error) - return "sparkChartView." + error; + return "text." + error; } } - if (message.thresholds != null && message.hasOwnProperty("thresholds")) { - if (!Array.isArray(message.thresholds)) - return "thresholds: array expected"; - for (var i = 0; i < message.thresholds.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (message.blank != null && message.hasOwnProperty("blank")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.protobuf.Empty.verify(message.blank); if (error) - return "thresholds." + error; + return "blank." + error; } } return null; }; /** - * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. + * Creates a Widget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @returns {google.monitoring.dashboard.v1.Widget} Widget */ - Scorecard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) + Widget.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Widget) return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + var message = new $root.google.monitoring.dashboard.v1.Widget(); + if (object.title != null) + message.title = String(object.title); + if (object.xyChart != null) { + if (typeof object.xyChart !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); } - if (object.gaugeView != null) { - if (typeof object.gaugeView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); + if (object.scorecard != null) { + if (typeof object.scorecard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); } - if (object.sparkChartView != null) { - if (typeof object.sparkChartView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); + message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); } - if (object.thresholds) { - if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); - message.thresholds = []; - for (var i = 0; i < object.thresholds.length; ++i) { - if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); - message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); - } + if (object.blank != null) { + if (typeof object.blank !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); + message.blank = $root.google.protobuf.Empty.fromObject(object.blank); } return message; }; /** - * Creates a plain object from a Scorecard message. Also converts values to other types if specified. + * Creates a plain object from a Widget message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @static - * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard + * @param {google.monitoring.dashboard.v1.Widget} message Widget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Scorecard.toObject = function toObject(message, options) { + Widget.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.thresholds = []; if (options.defaults) - object.timeSeriesQuery = null; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); if (options.oneofs) - object.dataView = "gaugeView"; + object.content = "xyChart"; } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); if (options.oneofs) - object.dataView = "sparkChartView"; + object.content = "scorecard"; } - if (message.thresholds && message.thresholds.length) { - object.thresholds = []; - for (var j = 0; j < message.thresholds.length; ++j) - object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); + if (options.oneofs) + object.content = "text"; + } + if (message.blank != null && message.hasOwnProperty("blank")) { + object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); + if (options.oneofs) + object.content = "blank"; } return object; }; /** - * Converts this Scorecard to JSON. + * Converts this Widget to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.Widget * @instance * @returns {Object.} JSON object */ - Scorecard.prototype.toJSON = function toJSON() { + Widget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Scorecard.GaugeView = (function() { + return Widget; + })(); - /** - * Properties of a GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface IGaugeView - * @property {number|null} [lowerBound] GaugeView lowerBound - * @property {number|null} [upperBound] GaugeView upperBound - */ + v1.Scorecard = (function() { - /** - * Constructs a new GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a GaugeView. - * @implements IGaugeView - * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - */ - function GaugeView(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @interface IScorecard + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery + * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView + * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView + * @property {Array.|null} [thresholds] Scorecard thresholds + */ - /** - * GaugeView lowerBound. - * @member {number} lowerBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.lowerBound = 0; + /** + * Constructs a new Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Scorecard. + * @implements IScorecard + * @constructor + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + */ + function Scorecard(properties) { + this.thresholds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * GaugeView upperBound. - * @member {number} upperBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.upperBound = 0; + /** + * Scorecard timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.timeSeriesQuery = null; - /** - * Creates a new GaugeView instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance - */ - GaugeView.create = function create(properties) { - return new GaugeView(properties); - }; - - /** - * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); - return writer; - }; - - /** - * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GaugeView message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lowerBound = reader.double(); - break; - case 2: - message.upperBound = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GaugeView message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GaugeView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GaugeView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound !== "number") - return "lowerBound: number expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound !== "number") - return "upperBound: number expected"; - return null; - }; - - /** - * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - */ - GaugeView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - if (object.lowerBound != null) - message.lowerBound = Number(object.lowerBound); - if (object.upperBound != null) - message.upperBound = Number(object.upperBound); - return message; - }; - - /** - * Creates a plain object from a GaugeView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GaugeView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lowerBound = 0; - object.upperBound = 0; - } - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; - return object; - }; - - /** - * Converts this GaugeView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - * @returns {Object.} JSON object - */ - GaugeView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GaugeView; - })(); - - Scorecard.SparkChartView = (function() { - - /** - * Properties of a SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface ISparkChartView - * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod - */ - - /** - * Constructs a new SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a SparkChartView. - * @implements ISparkChartView - * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set - */ - function SparkChartView(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SparkChartView sparkChartType. - * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - */ - SparkChartView.prototype.sparkChartType = 0; - - /** - * SparkChartView minAlignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - */ - SparkChartView.prototype.minAlignmentPeriod = null; - - /** - * Creates a new SparkChartView instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance - */ - SparkChartView.create = function create(properties) { - return new SparkChartView(properties); - }; - - /** - * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkChartView.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SparkChartView message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkChartView.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sparkChartType = reader.int32(); - break; - case 2: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SparkChartView message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkChartView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SparkChartView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkChartView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - switch (message.sparkChartType) { - default: - return "sparkChartType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); - if (error) - return "minAlignmentPeriod." + error; - } - return null; - }; - - /** - * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - */ - SparkChartView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); - switch (object.sparkChartType) { - case "SPARK_CHART_TYPE_UNSPECIFIED": - case 0: - message.sparkChartType = 0; - break; - case "SPARK_LINE": - case 1: - message.sparkChartType = 1; - break; - case "SPARK_BAR": - case 2: - message.sparkChartType = 2; - break; - } - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; - - /** - * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SparkChartView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; - object.minAlignmentPeriod = null; - } - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; - - /** - * Converts this SparkChartView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - * @returns {Object.} JSON object - */ - SparkChartView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SparkChartView; - })(); - - return Scorecard; - })(); - - v1.Text = (function() { - - /** - * Properties of a Text. - * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format - */ - - /** - * Constructs a new Text. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - */ - function Text(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.content = ""; - - /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.format = 0; - - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; - - /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && message.hasOwnProperty("format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); - return writer; - }; - - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Text message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.format = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Text message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Text.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Text) - return object; - var message = new $root.google.monitoring.dashboard.v1.Text(); - if (object.content != null) - message.content = String(object.content); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "MARKDOWN": - case 1: - message.format = 1; - break; - case "RAW": - case 2: - message.format = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.Text} message Text - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Text.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Format enum. - * @name google.monitoring.dashboard.v1.Text.Format - * @enum {string} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} MARKDOWN=1 MARKDOWN value - * @property {number} RAW=2 RAW value - */ - Text.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MARKDOWN"] = 1; - values[valuesById[2] = "RAW"] = 2; - return values; - })(); - - return Text; - })(); - - v1.XyChart = (function() { - - /** - * Properties of a XyChart. - * @memberof google.monitoring.dashboard.v1 - * @interface IXyChart - * @property {Array.|null} [dataSets] XyChart dataSets - * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration - * @property {Array.|null} [thresholds] XyChart thresholds - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis - * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions - */ - - /** - * Constructs a new XyChart. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a XyChart. - * @implements IXyChart - * @constructor - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - */ - function XyChart(properties) { - this.dataSets = []; - this.thresholds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * XyChart dataSets. - * @member {Array.} dataSets - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.dataSets = $util.emptyArray; - - /** - * XyChart timeshiftDuration. - * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.timeshiftDuration = null; - - /** - * XyChart thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.XyChart + /** + * Scorecard gaugeView. + * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance */ - XyChart.prototype.thresholds = $util.emptyArray; + Scorecard.prototype.gaugeView = null; /** - * XyChart xAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis - * @memberof google.monitoring.dashboard.v1.XyChart + * Scorecard sparkChartView. + * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance */ - XyChart.prototype.xAxis = null; + Scorecard.prototype.sparkChartView = null; /** - * XyChart yAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis - * @memberof google.monitoring.dashboard.v1.XyChart + * Scorecard thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance */ - XyChart.prototype.yAxis = null; + Scorecard.prototype.thresholds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * XyChart chartOptions. - * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions - * @memberof google.monitoring.dashboard.v1.XyChart + * Scorecard dataView. + * @member {"gaugeView"|"sparkChartView"|undefined} dataView + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance */ - XyChart.prototype.chartOptions = null; + Object.defineProperty(Scorecard.prototype, "dataView", { + get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new XyChart instance using the specified properties. + * Creates a new Scorecard instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance */ - XyChart.create = function create(properties) { - return new XyChart(properties); + Scorecard.create = function create(properties) { + return new Scorecard(properties); }; /** - * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - XyChart.encode = function encode(message, writer) { + Scorecard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSets != null && message.dataSets.length) - for (var i = 0; i < message.dataSets.length; ++i) - $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) - $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) + $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) + $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.thresholds != null && message.thresholds.length) for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.xAxis != null && message.hasOwnProperty("xAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yAxis != null && message.hasOwnProperty("yAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) - $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - XyChart.encodeDelimited = function encodeDelimited(message, writer) { + Scorecard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a XyChart message from the specified reader or buffer. + * Decodes a Scorecard message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - XyChart.decode = function decode(reader, length) { + Scorecard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.dataSets && message.dataSets.length)) - message.dataSets = []; - message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); break; case 4: - message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); break; case 5: + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); + break; + case 6: if (!(message.thresholds && message.thresholds.length)) message.thresholds = []; message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); break; - case 6: - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 7: - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 8: - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -12942,45 +12309,55 @@ }; /** - * Decodes a XyChart message from the specified reader or buffer, length delimited. + * Decodes a Scorecard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - XyChart.decodeDelimited = function decodeDelimited(reader) { + Scorecard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a XyChart message. + * Verifies a Scorecard message. * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - XyChart.verify = function verify(message) { + Scorecard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSets != null && message.hasOwnProperty("dataSets")) { - if (!Array.isArray(message.dataSets)) - return "dataSets: array expected"; - for (var i = 0; i < message.dataSets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); + var properties = {}; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); if (error) - return "dataSets." + error; + return "gaugeView." + error; } } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { - var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); - if (error) - return "timeshiftDuration." + error; + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + if (properties.dataView === 1) + return "dataView: multiple values"; + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); + if (error) + return "sparkChartView." + error; + } } if (message.thresholds != null && message.hasOwnProperty("thresholds")) { if (!Array.isArray(message.thresholds)) @@ -12991,155 +12368,116 @@ return "thresholds." + error; } } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); - if (error) - return "xAxis." + error; - } - if (message.yAxis != null && message.hasOwnProperty("yAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); - if (error) - return "yAxis." + error; - } - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { - var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); - if (error) - return "chartOptions." + error; - } return null; }; /** - * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard */ - XyChart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) + Scorecard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart(); - if (object.dataSets) { - if (!Array.isArray(object.dataSets)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); - message.dataSets = []; - for (var i = 0; i < object.dataSets.length; ++i) { - if (typeof object.dataSets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); - message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); - } + var message = new $root.google.monitoring.dashboard.v1.Scorecard(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); } - if (object.timeshiftDuration != null) { - if (typeof object.timeshiftDuration !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); - message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); + if (object.gaugeView != null) { + if (typeof object.gaugeView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); + } + if (object.sparkChartView != null) { + if (typeof object.sparkChartView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); } if (object.thresholds) { if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); message.thresholds = []; for (var i = 0; i < object.thresholds.length; ++i) { if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); } } - if (object.xAxis != null) { - if (typeof object.xAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); - } - if (object.yAxis != null) { - if (typeof object.yAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); - } - if (object.chartOptions != null) { - if (typeof object.chartOptions !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); - } return message; }; /** - * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.XyChart} message XyChart + * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - XyChart.toObject = function toObject(message, options) { + Scorecard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dataSets = []; + if (options.arrays || options.defaults) object.thresholds = []; + if (options.defaults) + object.timeSeriesQuery = null; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); + if (options.oneofs) + object.dataView = "gaugeView"; + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); + if (options.oneofs) + object.dataView = "sparkChartView"; } - if (options.defaults) { - object.timeshiftDuration = null; - object.xAxis = null; - object.yAxis = null; - object.chartOptions = null; - } - if (message.dataSets && message.dataSets.length) { - object.dataSets = []; - for (var j = 0; j < message.dataSets.length; ++j) - object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); - } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) - object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); if (message.thresholds && message.thresholds.length) { object.thresholds = []; for (var j = 0; j < message.thresholds.length; ++j) object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) - object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); - if (message.yAxis != null && message.hasOwnProperty("yAxis")) - object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) - object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); return object; }; /** - * Converts this XyChart to JSON. + * Converts this Scorecard to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance * @returns {Object.} JSON object */ - XyChart.prototype.toJSON = function toJSON() { + Scorecard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - XyChart.DataSet = (function() { + Scorecard.GaugeView = (function() { /** - * Properties of a DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IDataSet - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery - * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType - * @property {string|null} [legendTemplate] DataSet legendTemplate - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod + * Properties of a GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface IGaugeView + * @property {number|null} [lowerBound] GaugeView lowerBound + * @property {number|null} [upperBound] GaugeView upperBound */ /** - * Constructs a new DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents a DataSet. - * @implements IDataSet + * Constructs a new GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a GaugeView. + * @implements IGaugeView * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set */ - function DataSet(properties) { + function GaugeView(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13147,113 +12485,297 @@ } /** - * DataSet timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * GaugeView lowerBound. + * @member {number} lowerBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView * @instance */ - DataSet.prototype.timeSeriesQuery = null; + GaugeView.prototype.lowerBound = 0; /** - * DataSet plotType. - * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * GaugeView upperBound. + * @member {number} upperBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView * @instance */ - DataSet.prototype.plotType = 0; + GaugeView.prototype.upperBound = 0; + + /** + * Creates a new GaugeView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance + */ + GaugeView.create = function create(properties) { + return new GaugeView(properties); + }; + + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); + return writer; + }; + + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lowerBound = reader.double(); + break; + case 2: + message.upperBound = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GaugeView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GaugeView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; + + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + */ + GaugeView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; + + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GaugeView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; + + /** + * Converts this GaugeView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + * @returns {Object.} JSON object + */ + GaugeView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GaugeView; + })(); + + Scorecard.SparkChartView = (function() { + + /** + * Properties of a SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface ISparkChartView + * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod + */ + + /** + * Constructs a new SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a SparkChartView. + * @implements ISparkChartView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + */ + function SparkChartView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * DataSet legendTemplate. - * @member {string} legendTemplate - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * SparkChartView sparkChartType. + * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @instance */ - DataSet.prototype.legendTemplate = ""; + SparkChartView.prototype.sparkChartType = 0; /** - * DataSet minAlignmentPeriod. + * SparkChartView minAlignmentPeriod. * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @instance */ - DataSet.prototype.minAlignmentPeriod = null; + SparkChartView.prototype.minAlignmentPeriod = null; /** - * Creates a new DataSet instance using the specified properties. + * Creates a new SparkChartView instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance */ - DataSet.create = function create(properties) { - return new DataSet(properties); + SparkChartView.create = function create(properties) { + return new SparkChartView(properties); }; /** - * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSet.encode = function encode(message, writer) { + SparkChartView.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.plotType != null && message.hasOwnProperty("plotType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSet.encodeDelimited = function encodeDelimited(message, writer) { + SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataSet message from the specified reader or buffer. + * Decodes a SparkChartView message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSet.decode = function decode(reader, length) { + SparkChartView.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + message.sparkChartType = reader.int32(); break; case 2: - message.plotType = reader.int32(); - break; - case 3: - message.legendTemplate = reader.string(); - break; - case 4: message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: @@ -13265,51 +12787,41 @@ }; /** - * Decodes a DataSet message from the specified reader or buffer, length delimited. + * Decodes a SparkChartView message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSet.decodeDelimited = function decodeDelimited(reader) { + SparkChartView.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataSet message. + * Verifies a SparkChartView message. * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataSet.verify = function verify(message) { + SparkChartView.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; - } - if (message.plotType != null && message.hasOwnProperty("plotType")) - switch (message.plotType) { + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + switch (message.sparkChartType) { default: - return "plotType: enum value expected"; + return "sparkChartType: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - if (!$util.isString(message.legendTemplate)) - return "legendTemplate: string expected"; if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); if (error) @@ -13318,384 +12830,667 @@ return null; }; - /** - * Creates a DataSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - */ - DataSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); - } - switch (object.plotType) { - case "PLOT_TYPE_UNSPECIFIED": - case 0: - message.plotType = 0; - break; - case "LINE": + /** + * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + */ + SparkChartView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + switch (object.sparkChartType) { + case "SPARK_CHART_TYPE_UNSPECIFIED": + case 0: + message.sparkChartType = 0; + break; + case "SPARK_LINE": + case 1: + message.sparkChartType = 1; + break; + case "SPARK_BAR": + case 2: + message.sparkChartType = 2; + break; + } + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + return message; + }; + + /** + * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkChartView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; + object.minAlignmentPeriod = null; + } + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; + + /** + * Converts this SparkChartView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + * @returns {Object.} JSON object + */ + SparkChartView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SparkChartView; + })(); + + return Scorecard; + })(); + + v1.TimeSeriesQuery = (function() { + + /** + * Properties of a TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesQuery + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio + * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride + */ + + /** + * Constructs a new TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesQuery. + * @implements ITimeSeriesQuery + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + */ + function TimeSeriesQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesQuery timeSeriesFilter. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilter = null; + + /** + * TimeSeriesQuery timeSeriesFilterRatio. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; + + /** + * TimeSeriesQuery unitOverride. + * @member {string} unitOverride + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.unitOverride = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesQuery source. + * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|undefined} source + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + Object.defineProperty(TimeSeriesQuery.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesQuery instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance + */ + TimeSeriesQuery.create = function create(properties) { + return new TimeSeriesQuery(properties); + }; + + /** + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); + return writer; + }; + + /** + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.plotType = 1; + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); break; - case "STACKED_AREA": case 2: - message.plotType = 2; + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); break; - case "STACKED_BAR": - case 3: - message.plotType = 3; + case 5: + message.unitOverride = reader.string(); break; - case "HEATMAP": - case 4: - message.plotType = 4; + default: + reader.skipType(tag & 7); break; } - if (object.legendTemplate != null) - message.legendTemplate = String(object.legendTemplate); - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a DataSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeSeriesQuery = null; - object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; - object.legendTemplate = ""; - object.minAlignmentPeriod = null; + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesQuery message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); + if (error) + return "timeSeriesFilter." + error; } - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.plotType != null && message.hasOwnProperty("plotType")) - object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - object.legendTemplate = message.legendTemplate; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); + if (error) + return "timeSeriesFilterRatio." + error; + } + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + if (!$util.isString(message.unitOverride)) + return "unitOverride: string expected"; + return null; + }; - /** - * Converts this DataSet to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - * @returns {Object.} JSON object - */ - DataSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + */ + TimeSeriesQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + if (object.timeSeriesFilter != null) { + if (typeof object.timeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); + } + if (object.timeSeriesFilterRatio != null) { + if (typeof object.timeSeriesFilterRatio !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); + } + if (object.unitOverride != null) + message.unitOverride = String(object.unitOverride); + return message; + }; - /** - * PlotType enum. - * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - * @enum {string} - * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value - * @property {number} LINE=1 LINE value - * @property {number} STACKED_AREA=2 STACKED_AREA value - * @property {number} STACKED_BAR=3 STACKED_BAR value - * @property {number} HEATMAP=4 HEATMAP value - */ - DataSet.PlotType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE"] = 1; - values[valuesById[2] = "STACKED_AREA"] = 2; - values[valuesById[3] = "STACKED_BAR"] = 3; - values[valuesById[4] = "HEATMAP"] = 4; - return values; - })(); + /** + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unitOverride = ""; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); + if (options.oneofs) + object.source = "timeSeriesFilter"; + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); + if (options.oneofs) + object.source = "timeSeriesFilterRatio"; + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + object.unitOverride = message.unitOverride; + return object; + }; - return DataSet; - })(); + /** + * Converts this TimeSeriesQuery to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - XyChart.Axis = (function() { + return TimeSeriesQuery; + })(); - /** - * Properties of an Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IAxis - * @property {string|null} [label] Axis label - * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale - */ + v1.TimeSeriesFilter = (function() { - /** - * Constructs a new Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents an Axis. - * @implements IAxis - * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - */ - function Axis(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesFilter + * @property {string|null} [filter] TimeSeriesFilter filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter + */ - /** - * Axis label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.label = ""; + /** + * Constructs a new TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesFilter. + * @implements ITimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + */ + function TimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Axis scale. - * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.scale = 0; + /** + * TimeSeriesFilter filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.filter = ""; - /** - * Creates a new Axis instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance - */ - Axis.create = function create(properties) { - return new Axis(properties); - }; + /** + * TimeSeriesFilter aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.aggregation = null; - /** - * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.scale != null && message.hasOwnProperty("scale")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); - return writer; - }; + /** + * TimeSeriesFilter pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; - /** - * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TimeSeriesFilter statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; - /** - * Decodes an Axis message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.scale = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes an Axis message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * TimeSeriesFilter outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies an Axis message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Axis.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - switch (message.scale) { - default: - return "scale: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Creates a new TimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance + */ + TimeSeriesFilter.create = function create(properties) { + return new TimeSeriesFilter(properties); + }; + + /** + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates an Axis message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - */ - Axis.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - if (object.label != null) - message.label = String(object.label); - switch (object.scale) { - case "SCALE_UNSPECIFIED": - case 0: - message.scale = 0; - break; - case "LINEAR": + /** + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.scale = 1; + message.filter = reader.string(); break; - case "LOG10": case 2: - message.scale = 2; + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Axis message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Axis.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; - return object; - }; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; + } + } + return null; + }; - /** - * Converts this Axis to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - * @returns {Object.} JSON object - */ - Axis.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + */ + TimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + } + return message; + }; - /** - * Scale enum. - * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale - * @enum {string} - * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value - * @property {number} LINEAR=1 LINEAR value - * @property {number} LOG10=2 LOG10 value - */ - Axis.Scale = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINEAR"] = 1; - values[valuesById[2] = "LOG10"] = 2; - return values; - })(); + /** + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } + return object; + }; - return Axis; - })(); + /** + * Converts this TimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return XyChart; + return TimeSeriesFilter; })(); - v1.ChartOptions = (function() { + v1.TimeSeriesFilterRatio = (function() { /** - * Properties of a ChartOptions. + * Properties of a TimeSeriesFilterRatio. * @memberof google.monitoring.dashboard.v1 - * @interface IChartOptions - * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode + * @interface ITimeSeriesFilterRatio + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter */ /** - * Constructs a new ChartOptions. + * Constructs a new TimeSeriesFilterRatio. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ChartOptions. - * @implements IChartOptions + * @classdesc Represents a TimeSeriesFilterRatio. + * @implements ITimeSeriesFilterRatio * @constructor - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set */ - function ChartOptions(properties) { + function TimeSeriesFilterRatio(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13703,75 +13498,141 @@ } /** - * ChartOptions mode. - * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * TimeSeriesFilterRatio numerator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @instance */ - ChartOptions.prototype.mode = 0; + TimeSeriesFilterRatio.prototype.numerator = null; /** - * Creates a new ChartOptions instance using the specified properties. + * TimeSeriesFilterRatio denominator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.denominator = null; + + /** + * TimeSeriesFilterRatio secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.secondaryAggregation = null; + + /** + * TimeSeriesFilterRatio pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; + + /** + * TimeSeriesFilterRatio statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesFilterRatio outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance */ - ChartOptions.create = function create(properties) { - return new ChartOptions(properties); + TimeSeriesFilterRatio.create = function create(properties) { + return new TimeSeriesFilterRatio(properties); }; /** - * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartOptions.encode = function encode(message, writer) { + TimeSeriesFilterRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && message.hasOwnProperty("mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.numerator != null && message.hasOwnProperty("numerator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denominator != null && message.hasOwnProperty("denominator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChartOptions message from the specified reader or buffer. + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartOptions.decode = function decode(reader, length) { + TimeSeriesFilterRatio.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mode = reader.int32(); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 2: + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13782,152 +13643,396 @@ }; /** - * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartOptions.decodeDelimited = function decodeDelimited(reader) { + TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChartOptions message. + * Verifies a TimeSeriesFilterRatio message. * @function verify - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChartOptions.verify = function verify(message) { + TimeSeriesFilterRatio.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + var properties = {}; + if (message.numerator != null && message.hasOwnProperty("numerator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); + if (error) + return "numerator." + error; + } + if (message.denominator != null && message.hasOwnProperty("denominator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); + if (error) + return "denominator." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; } + } return null; }; /** - * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio */ - ChartOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) + TimeSeriesFilterRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) return object; - var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "COLOR": - case 1: - message.mode = 1; - break; - case "X_RAY": - case 2: - message.mode = 2; - break; - case "STATS": - case 3: - message.mode = 3; - break; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + if (object.numerator != null) { + if (typeof object.numerator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); + } + if (object.denominator != null) { + if (typeof object.denominator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); } return message; }; /** - * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChartOptions.toObject = function toObject(message, options) { + TimeSeriesFilterRatio.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; + if (options.defaults) { + object.numerator = null; + object.denominator = null; + object.secondaryAggregation = null; + } + if (message.numerator != null && message.hasOwnProperty("numerator")) + object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); + if (message.denominator != null && message.hasOwnProperty("denominator")) + object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } return object; }; /** - * Converts this ChartOptions to JSON. + * Converts this TimeSeriesFilterRatio to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @instance * @returns {Object.} JSON object */ - ChartOptions.prototype.toJSON = function toJSON() { + TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Mode enum. - * @name google.monitoring.dashboard.v1.ChartOptions.Mode - * @enum {string} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} COLOR=1 COLOR value - * @property {number} X_RAY=2 X_RAY value - * @property {number} STATS=3 STATS value - */ - ChartOptions.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COLOR"] = 1; - values[valuesById[2] = "X_RAY"] = 2; - values[valuesById[3] = "STATS"] = 3; - return values; + TimeSeriesFilterRatio.RatioPart = (function() { + + /** + * Properties of a RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @interface IRatioPart + * @property {string|null} [filter] RatioPart filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation + */ + + /** + * Constructs a new RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @classdesc Represents a RatioPart. + * @implements IRatioPart + * @constructor + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + */ + function RatioPart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RatioPart filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.filter = ""; + + /** + * RatioPart aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.aggregation = null; + + /** + * Creates a new RatioPart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance + */ + RatioPart.create = function create(properties) { + return new RatioPart(properties); + }; + + /** + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RatioPart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RatioPart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RatioPart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + return null; + }; + + /** + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + */ + RatioPart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + return message; + }; + + /** + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RatioPart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + return object; + }; + + /** + * Converts this RatioPart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + * @returns {Object.} JSON object + */ + RatioPart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RatioPart; })(); - return ChartOptions; + return TimeSeriesFilterRatio; })(); - v1.Widget = (function() { + v1.Threshold = (function() { /** - * Properties of a Widget. + * Properties of a Threshold. * @memberof google.monitoring.dashboard.v1 - * @interface IWidget - * @property {string|null} [title] Widget title - * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart - * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard - * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text - * @property {google.protobuf.IEmpty|null} [blank] Widget blank + * @interface IThreshold + * @property {string|null} [label] Threshold label + * @property {number|null} [value] Threshold value + * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color + * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction */ /** - * Constructs a new Widget. + * Constructs a new Threshold. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Widget. - * @implements IWidget + * @classdesc Represents a Threshold. + * @implements IThreshold * @constructor - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set */ - function Widget(properties) { + function Threshold(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13935,141 +14040,114 @@ } /** - * Widget title. - * @member {string} title - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.title = ""; - - /** - * Widget xyChart. - * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.xyChart = null; - - /** - * Widget scorecard. - * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard - * @memberof google.monitoring.dashboard.v1.Widget + * Threshold label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.Threshold * @instance */ - Widget.prototype.scorecard = null; + Threshold.prototype.label = ""; /** - * Widget text. - * @member {google.monitoring.dashboard.v1.IText|null|undefined} text - * @memberof google.monitoring.dashboard.v1.Widget + * Threshold value. + * @member {number} value + * @memberof google.monitoring.dashboard.v1.Threshold * @instance */ - Widget.prototype.text = null; + Threshold.prototype.value = 0; /** - * Widget blank. - * @member {google.protobuf.IEmpty|null|undefined} blank - * @memberof google.monitoring.dashboard.v1.Widget + * Threshold color. + * @member {google.monitoring.dashboard.v1.Threshold.Color} color + * @memberof google.monitoring.dashboard.v1.Threshold * @instance */ - Widget.prototype.blank = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Threshold.prototype.color = 0; /** - * Widget content. - * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content - * @memberof google.monitoring.dashboard.v1.Widget + * Threshold direction. + * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction + * @memberof google.monitoring.dashboard.v1.Threshold * @instance */ - Object.defineProperty(Widget.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), - set: $util.oneOfSetter($oneOfFields) - }); + Threshold.prototype.direction = 0; /** - * Creates a new Widget instance using the specified properties. + * Creates a new Threshold instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Widget} Widget instance + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance */ - Widget.create = function create(properties) { - return new Widget(properties); + Threshold.create = function create(properties) { + return new Threshold(properties); }; /** - * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widget.encode = function encode(message, writer) { + Threshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && message.hasOwnProperty("title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.xyChart != null && message.hasOwnProperty("xyChart")) - $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.scorecard != null && message.hasOwnProperty("scorecard")) - $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.text != null && message.hasOwnProperty("text")) - $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.blank != null && message.hasOwnProperty("blank")) - $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); + if (message.color != null && message.hasOwnProperty("color")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); + if (message.direction != null && message.hasOwnProperty("direction")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); return writer; }; /** - * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widget.encodeDelimited = function encodeDelimited(message, writer) { + Threshold.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Widget message from the specified reader or buffer. + * Decodes a Threshold message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widget.decode = function decode(reader, length) { + Threshold.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.label = reader.string(); break; case 2: - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + message.value = reader.double(); break; case 3: - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); + message.color = reader.int32(); break; case 4: - message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); - break; - case 5: - message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + message.direction = reader.int32(); break; default: reader.skipType(tag & 7); @@ -14080,188 +14158,217 @@ }; /** - * Decodes a Widget message from the specified reader or buffer, length delimited. + * Decodes a Threshold message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widget.decodeDelimited = function decodeDelimited(reader) { + Threshold.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Widget message. + * Verifies a Threshold message. * @function verify - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Widget.verify = function verify(message) { + Threshold.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); - if (error) - return "xyChart." + error; - } - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); - if (error) - return "scorecard." + error; - } - } - if (message.text != null && message.hasOwnProperty("text")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); - if (error) - return "text." + error; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.color != null && message.hasOwnProperty("color")) + switch (message.color) { + default: + return "color: enum value expected"; + case 0: + case 4: + case 6: + break; } - } - if (message.blank != null && message.hasOwnProperty("blank")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.protobuf.Empty.verify(message.blank); - if (error) - return "blank." + error; + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold */ - Widget.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Widget) - return object; - var message = new $root.google.monitoring.dashboard.v1.Widget(); - if (object.title != null) - message.title = String(object.title); - if (object.xyChart != null) { - if (typeof object.xyChart !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); - } - if (object.scorecard != null) { - if (typeof object.scorecard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); - } - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); - message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); + Threshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) + return object; + var message = new $root.google.monitoring.dashboard.v1.Threshold(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = Number(object.value); + switch (object.color) { + case "COLOR_UNSPECIFIED": + case 0: + message.color = 0; + break; + case "YELLOW": + case 4: + message.color = 4; + break; + case "RED": + case 6: + message.color = 6; + break; } - if (object.blank != null) { - if (typeof object.blank !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); - message.blank = $root.google.protobuf.Empty.fromObject(object.blank); + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "ABOVE": + case 1: + message.direction = 1; + break; + case "BELOW": + case 2: + message.direction = 2; + break; } return message; }; /** - * Creates a plain object from a Widget message. Also converts values to other types if specified. + * Creates a plain object from a Threshold message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.Widget} message Widget + * @param {google.monitoring.dashboard.v1.Threshold} message Threshold * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Widget.toObject = function toObject(message, options) { + Threshold.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); - if (options.oneofs) - object.content = "xyChart"; - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); - if (options.oneofs) - object.content = "scorecard"; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); - if (options.oneofs) - object.content = "text"; - } - if (message.blank != null && message.hasOwnProperty("blank")) { - object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); - if (options.oneofs) - object.content = "blank"; + if (options.defaults) { + object.label = ""; + object.value = 0; + object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.color != null && message.hasOwnProperty("color")) + object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; return object; }; /** - * Converts this Widget to JSON. + * Converts this Threshold to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Threshold * @instance * @returns {Object.} JSON object */ - Widget.prototype.toJSON = function toJSON() { + Threshold.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Widget; + /** + * Color enum. + * @name google.monitoring.dashboard.v1.Threshold.Color + * @enum {string} + * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value + * @property {number} YELLOW=4 YELLOW value + * @property {number} RED=6 RED value + */ + Threshold.Color = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; + values[valuesById[4] = "YELLOW"] = 4; + values[valuesById[6] = "RED"] = 6; + return values; + })(); + + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.Threshold.Direction + * @enum {string} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} ABOVE=1 ABOVE value + * @property {number} BELOW=2 BELOW value + */ + Threshold.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ABOVE"] = 1; + values[valuesById[2] = "BELOW"] = 2; + return values; + })(); + + return Threshold; })(); - v1.GridLayout = (function() { + /** + * SparkChartType enum. + * @name google.monitoring.dashboard.v1.SparkChartType + * @enum {string} + * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value + * @property {number} SPARK_LINE=1 SPARK_LINE value + * @property {number} SPARK_BAR=2 SPARK_BAR value + */ + v1.SparkChartType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_LINE"] = 1; + values[valuesById[2] = "SPARK_BAR"] = 2; + return values; + })(); + + v1.Text = (function() { /** - * Properties of a GridLayout. + * Properties of a Text. * @memberof google.monitoring.dashboard.v1 - * @interface IGridLayout - * @property {number|Long|null} [columns] GridLayout columns - * @property {Array.|null} [widgets] GridLayout widgets + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format */ /** - * Constructs a new GridLayout. + * Constructs a new Text. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GridLayout. - * @implements IGridLayout + * @classdesc Represents a Text. + * @implements IText * @constructor - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set */ - function GridLayout(properties) { - this.widgets = []; + function Text(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14269,91 +14376,88 @@ } /** - * GridLayout columns. - * @member {number|Long} columns - * @memberof google.monitoring.dashboard.v1.GridLayout + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text * @instance */ - GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Text.prototype.content = ""; /** - * GridLayout widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.GridLayout + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text * @instance */ - GridLayout.prototype.widgets = $util.emptyArray; + Text.prototype.format = 0; /** - * Creates a new GridLayout instance using the specified properties. + * Creates a new Text instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance */ - GridLayout.create = function create(properties) { - return new GridLayout(properties); + Text.create = function create(properties) { + return new Text(properties); }; /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encode = function encode(message, writer) { + Text.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && message.hasOwnProperty("columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && message.hasOwnProperty("format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); return writer; }; /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + Text.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GridLayout message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decode = function decode(reader, length) { + Text.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columns = reader.int64(); + message.content = reader.string(); break; case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + message.format = reader.int32(); break; default: reader.skipType(tag & 7); @@ -14364,148 +14468,157 @@ }; /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decodeDelimited = function decodeDelimited(reader) { + Text.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GridLayout message. + * Verifies a Text message. * @function verify - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GridLayout.verify = function verify(message) { + Text.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) - return "columns: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.Text} Text */ - GridLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Text) return object; - var message = new $root.google.monitoring.dashboard.v1.GridLayout(); - if (object.columns != null) - if ($util.Long) - (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; - else if (typeof object.columns === "string") - message.columns = parseInt(object.columns, 10); - else if (typeof object.columns === "number") - message.columns = object.columns; - else if (typeof object.columns === "object") - message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + var message = new $root.google.monitoring.dashboard.v1.Text(); + if (object.content != null) + message.content = String(object.content); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "MARKDOWN": + case 1: + message.format = 1; + break; + case "RAW": + case 2: + message.format = 2; + break; } return message; }; /** - * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * Creates a plain object from a Text message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout + * @param {google.monitoring.dashboard.v1.Text} message Text * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GridLayout.toObject = function toObject(message, options) { + Text.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.columns = options.longs === String ? "0" : 0; - if (message.columns != null && message.hasOwnProperty("columns")) - if (typeof message.columns === "number") - object.columns = options.longs === String ? String(message.columns) : message.columns; - else - object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + if (options.defaults) { + object.content = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; return object; }; /** - * Converts this GridLayout to JSON. + * Converts this Text to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.Text * @instance * @returns {Object.} JSON object */ - GridLayout.prototype.toJSON = function toJSON() { + Text.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GridLayout; + /** + * Format enum. + * @name google.monitoring.dashboard.v1.Text.Format + * @enum {string} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} MARKDOWN=1 MARKDOWN value + * @property {number} RAW=2 RAW value + */ + Text.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MARKDOWN"] = 1; + values[valuesById[2] = "RAW"] = 2; + return values; + })(); + + return Text; })(); - v1.RowLayout = (function() { + v1.XyChart = (function() { /** - * Properties of a RowLayout. + * Properties of a XyChart. * @memberof google.monitoring.dashboard.v1 - * @interface IRowLayout - * @property {Array.|null} [rows] RowLayout rows + * @interface IXyChart + * @property {Array.|null} [dataSets] XyChart dataSets + * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration + * @property {Array.|null} [thresholds] XyChart thresholds + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions */ /** - * Constructs a new RowLayout. + * Constructs a new XyChart. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a RowLayout. - * @implements IRowLayout + * @classdesc Represents a XyChart. + * @implements IXyChart * @constructor - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set */ - function RowLayout(properties) { - this.rows = []; + function XyChart(properties) { + this.dataSets = []; + this.thresholds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14513,78 +14626,146 @@ } /** - * RowLayout rows. - * @member {Array.} rows - * @memberof google.monitoring.dashboard.v1.RowLayout + * XyChart dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - RowLayout.prototype.rows = $util.emptyArray; + XyChart.prototype.dataSets = $util.emptyArray; /** - * Creates a new RowLayout instance using the specified properties. + * XyChart timeshiftDuration. + * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.timeshiftDuration = null; + + /** + * XyChart thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.thresholds = $util.emptyArray; + + /** + * XyChart xAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.xAxis = null; + + /** + * XyChart yAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.yAxis = null; + + /** + * XyChart chartOptions. + * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.chartOptions = null; + + /** + * Creates a new XyChart instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance */ - RowLayout.create = function create(properties) { - return new RowLayout(properties); + XyChart.create = function create(properties) { + return new XyChart(properties); }; /** - * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encode = function encode(message, writer) { + XyChart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + XyChart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowLayout message from the specified reader or buffer. + * Decodes a XyChart message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decode = function decode(reader, length) { + XyChart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); + break; + case 4: + message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + case 6: + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 7: + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 8: + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14595,123 +14776,204 @@ }; /** - * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * Decodes a XyChart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decodeDelimited = function decodeDelimited(reader) { + XyChart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowLayout message. + * Verifies a XyChart message. * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RowLayout.verify = function verify(message) { + XyChart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); if (error) - return "rows." + error; + return "dataSets." + error; + } + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { + var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); + if (error) + return "timeshiftDuration." + error; + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; } } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); + if (error) + return "xAxis." + error; + } + if (message.yAxis != null && message.hasOwnProperty("yAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); + if (error) + return "yAxis." + error; + } + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { + var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); + if (error) + return "chartOptions." + error; + } return null; }; /** - * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart */ - RowLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + XyChart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout(); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); - message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); + var message = new $root.google.monitoring.dashboard.v1.XyChart(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); + } + } + if (object.timeshiftDuration != null) { + if (typeof object.timeshiftDuration !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); + message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); } } + if (object.xAxis != null) { + if (typeof object.xAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); + } + if (object.yAxis != null) { + if (typeof object.yAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); + } + if (object.chartOptions != null) { + if (typeof object.chartOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); + } return message; }; /** - * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * Creates a plain object from a XyChart message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {google.monitoring.dashboard.v1.XyChart} message XyChart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowLayout.toObject = function toObject(message, options) { + XyChart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rows = []; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + if (options.arrays || options.defaults) { + object.dataSets = []; + object.thresholds = []; + } + if (options.defaults) { + object.timeshiftDuration = null; + object.xAxis = null; + object.yAxis = null; + object.chartOptions = null; + } + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); return object; }; /** - * Converts this RowLayout to JSON. + * Converts this XyChart to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.XyChart * @instance * @returns {Object.} JSON object */ - RowLayout.prototype.toJSON = function toJSON() { + XyChart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - RowLayout.Row = (function() { + XyChart.DataSet = (function() { /** - * Properties of a Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @interface IRow - * @property {number|Long|null} [weight] Row weight - * @property {Array.|null} [widgets] Row widgets + * Properties of a DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType + * @property {string|null} [legendTemplate] DataSet legendTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod */ /** - * Constructs a new Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @classdesc Represents a Row. - * @implements IRow + * Constructs a new DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents a DataSet. + * @implements IDataSet * @constructor - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set */ - function Row(properties) { - this.widgets = []; + function DataSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14719,91 +14981,114 @@ } /** - * Row weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * DataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @instance */ - Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DataSet.prototype.timeSeriesQuery = null; /** - * Row widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * DataSet plotType. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @instance */ - Row.prototype.widgets = $util.emptyArray; + DataSet.prototype.plotType = 0; /** - * Creates a new Row instance using the specified properties. + * DataSet legendTemplate. + * @member {string} legendTemplate + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.legendTemplate = ""; + + /** + * DataSet minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.minAlignmentPeriod = null; + + /** + * Creates a new DataSet instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance */ - Row.create = function create(properties) { - return new Row(properties); + DataSet.create = function create(properties) { + return new DataSet(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + DataSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weight != null && message.hasOwnProperty("weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.plotType != null && message.hasOwnProperty("plotType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + DataSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a DataSet message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decode = function decode(reader, length) { + DataSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.weight = reader.int64(); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); break; case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + message.plotType = reader.int32(); + break; + case 3: + message.legendTemplate = reader.string(); + break; + case 4: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14814,357 +15099,191 @@ }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a DataSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decodeDelimited = function decodeDelimited(reader) { + DataSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a DataSet message. * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Row.verify = function verify(message) { + DataSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; } - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) - return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + if (message.plotType != null && message.hasOwnProperty("plotType")) + switch (message.plotType) { + default: + return "plotType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + if (!$util.isString(message.legendTemplate)) + return "legendTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; } - return message; - }; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); - } - return object; + return null; }; /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Row; - })(); - - return RowLayout; - })(); - - v1.ColumnLayout = (function() { - - /** - * Properties of a ColumnLayout. - * @memberof google.monitoring.dashboard.v1 - * @interface IColumnLayout - * @property {Array.|null} [columns] ColumnLayout columns - */ - - /** - * Constructs a new ColumnLayout. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ColumnLayout. - * @implements IColumnLayout - * @constructor - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set - */ - function ColumnLayout(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ColumnLayout columns. - * @member {Array.} columns - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @instance - */ - ColumnLayout.prototype.columns = $util.emptyArray; - - /** - * Creates a new ColumnLayout instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance - */ - ColumnLayout.create = function create(properties) { - return new ColumnLayout(properties); - }; - - /** - * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnLayout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ColumnLayout message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnLayout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + */ + DataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + switch (object.plotType) { + case "PLOT_TYPE_UNSPECIFIED": + case 0: + message.plotType = 0; + break; + case "LINE": case 1: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); + message.plotType = 1; break; - default: - reader.skipType(tag & 7); + case "STACKED_AREA": + case 2: + message.plotType = 2; + break; + case "STACKED_BAR": + case 3: + message.plotType = 3; + break; + case "HEATMAP": + case 4: + message.plotType = 4; break; } - } - return message; - }; - - /** - * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnLayout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ColumnLayout message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnLayout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); - if (error) - return "columns." + error; + if (object.legendTemplate != null) + message.legendTemplate = String(object.legendTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); } - } - return null; - }; + return message; + }; - /** - * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - */ - ColumnLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) - return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); - message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; + object.legendTemplate = ""; + object.minAlignmentPeriod = null; } - } - return message; - }; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.plotType != null && message.hasOwnProperty("plotType")) + object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + object.legendTemplate = message.legendTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; - /** - * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnLayout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); - } - return object; - }; + /** + * Converts this DataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + * @returns {Object.} JSON object + */ + DataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ColumnLayout to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @instance - * @returns {Object.} JSON object - */ - ColumnLayout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * PlotType enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType + * @enum {string} + * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value + * @property {number} LINE=1 LINE value + * @property {number} STACKED_AREA=2 STACKED_AREA value + * @property {number} STACKED_BAR=3 STACKED_BAR value + * @property {number} HEATMAP=4 HEATMAP value + */ + DataSet.PlotType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE"] = 1; + values[valuesById[2] = "STACKED_AREA"] = 2; + values[valuesById[3] = "STACKED_BAR"] = 3; + values[valuesById[4] = "HEATMAP"] = 4; + return values; + })(); - ColumnLayout.Column = (function() { + return DataSet; + })(); + + XyChart.Axis = (function() { /** - * Properties of a Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @interface IColumn - * @property {number|Long|null} [weight] Column weight - * @property {Array.|null} [widgets] Column widgets + * Properties of an Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IAxis + * @property {string|null} [label] Axis label + * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale */ /** - * Constructs a new Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @classdesc Represents a Column. - * @implements IColumn + * Constructs a new Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents an Axis. + * @implements IAxis * @constructor - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set */ - function Column(properties) { - this.widgets = []; + function Axis(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15172,91 +15291,88 @@ } /** - * Column weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * Axis label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @instance */ - Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Axis.prototype.label = ""; /** - * Column widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * Axis scale. + * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @instance */ - Column.prototype.widgets = $util.emptyArray; + Axis.prototype.scale = 0; /** - * Creates a new Column instance using the specified properties. + * Creates a new Axis instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance */ - Column.create = function create(properties) { - return new Column(properties); + Axis.create = function create(properties) { + return new Axis(properties); }; /** - * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encode = function encode(message, writer) { + Axis.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weight != null && message.hasOwnProperty("weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.scale != null && message.hasOwnProperty("scale")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); return writer; }; /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encodeDelimited = function encodeDelimited(message, writer) { + Axis.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Column message from the specified reader or buffer. + * Decodes an Axis message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decode = function decode(reader, length) { + Axis.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.weight = reader.int64(); + message.label = reader.string(); break; case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + message.scale = reader.int32(); break; default: reader.skipType(tag & 7); @@ -15267,310 +15383,229 @@ }; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes an Axis message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decodeDelimited = function decodeDelimited(reader) { + Axis.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Column message. + * Verifies an Axis message. * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Column.verify = function verify(message) { + Axis.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + switch (message.scale) { + default: + return "scale: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. + * Creates an Axis message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) + Axis.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + if (object.label != null) + message.label = String(object.label); + switch (object.scale) { + case "SCALE_UNSPECIFIED": + case 0: + message.scale = 0; + break; + case "LINEAR": + case 1: + message.scale = 1; + break; + case "LOG10": + case 2: + message.scale = 2; + break; } return message; }; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. + * Creates a plain object from an Axis message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column + * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Column.toObject = function toObject(message, options) { + Axis.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + if (options.defaults) { + object.label = ""; + object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; return object; }; /** - * Converts this Column to JSON. + * Converts this Axis to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @memberof google.monitoring.dashboard.v1.XyChart.Axis * @instance * @returns {Object.} JSON object */ - Column.prototype.toJSON = function toJSON() { + Axis.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Column; + /** + * Scale enum. + * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale + * @enum {string} + * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value + * @property {number} LINEAR=1 LINEAR value + * @property {number} LOG10=2 LOG10 value + */ + Axis.Scale = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINEAR"] = 1; + values[valuesById[2] = "LOG10"] = 2; + return values; + })(); + + return Axis; })(); - return ColumnLayout; + return XyChart; })(); - v1.Dashboard = (function() { + v1.ChartOptions = (function() { /** - * Properties of a Dashboard. + * Properties of a ChartOptions. * @memberof google.monitoring.dashboard.v1 - * @interface IDashboard - * @property {string|null} [name] Dashboard name - * @property {string|null} [displayName] Dashboard displayName - * @property {string|null} [etag] Dashboard etag - * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout - * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout - * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + * @interface IChartOptions + * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode */ /** - * Constructs a new Dashboard. + * Constructs a new ChartOptions. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Dashboard. - * @implements IDashboard + * @classdesc Represents a ChartOptions. + * @implements IChartOptions * @constructor - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set */ - function Dashboard(properties) { + function ChartOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Dashboard name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.name = ""; - - /** - * Dashboard displayName. - * @member {string} displayName - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.displayName = ""; - - /** - * Dashboard etag. - * @member {string} etag - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.etag = ""; - - /** - * Dashboard gridLayout. - * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.gridLayout = null; - - /** - * Dashboard rowLayout. - * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.rowLayout = null; - - /** - * Dashboard columnLayout. - * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.columnLayout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Dashboard layout. - * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout - * @memberof google.monitoring.dashboard.v1.Dashboard + * ChartOptions mode. + * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode + * @memberof google.monitoring.dashboard.v1.ChartOptions * @instance */ - Object.defineProperty(Dashboard.prototype, "layout", { - get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), - set: $util.oneOfSetter($oneOfFields) - }); + ChartOptions.prototype.mode = 0; /** - * Creates a new Dashboard instance using the specified properties. + * Creates a new ChartOptions instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance */ - Dashboard.create = function create(properties) { - return new Dashboard(properties); + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); }; /** - * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dashboard.encode = function encode(message, writer) { + ChartOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.etag != null && message.hasOwnProperty("etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) - $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) - $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) - $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.mode != null && message.hasOwnProperty("mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dashboard.encodeDelimited = function encodeDelimited(message, writer) { + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dashboard message from the specified reader or buffer. + * Decodes a ChartOptions message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dashboard.decode = function decode(reader, length) { + ChartOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 4: - message.etag = reader.string(); - break; - case 5: - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); - break; - case 8: - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); - break; - case 9: - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + message.mode = reader.int32(); break; default: reader.skipType(tag & 7); @@ -15581,163 +15616,128 @@ }; /** - * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dashboard.decodeDelimited = function decodeDelimited(reader) { + ChartOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dashboard message. + * Verifies a ChartOptions message. * @function verify - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dashboard.verify = function verify(message) { + ChartOptions.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); - if (error) - return "gridLayout." + error; - } - } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); - if (error) - return "rowLayout." + error; - } - } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); - if (error) - return "columnLayout." + error; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } return null; }; /** - * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions */ - Dashboard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) return object; - var message = new $root.google.monitoring.dashboard.v1.Dashboard(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.etag != null) - message.etag = String(object.etag); - if (object.gridLayout != null) { - if (typeof object.gridLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); - } - if (object.rowLayout != null) { - if (typeof object.rowLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); - } - if (object.columnLayout != null) { - if (typeof object.columnLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); + var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "COLOR": + case 1: + message.mode = 1; + break; + case "X_RAY": + case 2: + message.mode = 2; + break; + case "STATS": + case 3: + message.mode = 3; + break; } return message; }; /** - * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard + * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dashboard.toObject = function toObject(message, options) { + ChartOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); - if (options.oneofs) - object.layout = "gridLayout"; - } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); - if (options.oneofs) - object.layout = "rowLayout"; - } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); - if (options.oneofs) - object.layout = "columnLayout"; - } + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; return object; }; /** - * Converts this Dashboard to JSON. + * Converts this ChartOptions to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.ChartOptions * @instance * @returns {Object.} JSON object */ - Dashboard.prototype.toJSON = function toJSON() { + ChartOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Dashboard; + /** + * Mode enum. + * @name google.monitoring.dashboard.v1.ChartOptions.Mode + * @enum {string} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} COLOR=1 COLOR value + * @property {number} X_RAY=2 X_RAY value + * @property {number} STATS=3 STATS value + */ + ChartOptions.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COLOR"] = 1; + values[valuesById[2] = "X_RAY"] = 2; + values[valuesById[3] = "STATS"] = 3; + return values; + })(); + + return ChartOptions; })(); v1.DashboardsService = (function() { diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index c80a24c56c1..8068c6bce14 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -1050,6 +1050,196 @@ } } }, + "Dashboard": { + "oneofs": { + "layout": { + "oneof": [ + "gridLayout", + "rowLayout", + "columnLayout" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "etag": { + "type": "string", + "id": 4 + }, + "gridLayout": { + "type": "GridLayout", + "id": 5 + }, + "rowLayout": { + "type": "RowLayout", + "id": 8 + }, + "columnLayout": { + "type": "ColumnLayout", + "id": 9 + } + } + }, + "GridLayout": { + "fields": { + "columns": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + }, + "RowLayout": { + "fields": { + "rows": { + "rule": "repeated", + "type": "Row", + "id": 1 + } + }, + "nested": { + "Row": { + "fields": { + "weight": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + } + } + }, + "ColumnLayout": { + "fields": { + "columns": { + "rule": "repeated", + "type": "Column", + "id": 1 + } + }, + "nested": { + "Column": { + "fields": { + "weight": { + "type": "int64", + "id": 1 + }, + "widgets": { + "rule": "repeated", + "type": "Widget", + "id": 2 + } + } + } + } + }, + "Widget": { + "oneofs": { + "content": { + "oneof": [ + "xyChart", + "scorecard", + "text", + "blank" + ] + } + }, + "fields": { + "title": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "xyChart": { + "type": "XyChart", + "id": 2 + }, + "scorecard": { + "type": "Scorecard", + "id": 3 + }, + "text": { + "type": "Text", + "id": 4 + }, + "blank": { + "type": "google.protobuf.Empty", + "id": 5 + } + } + }, + "Scorecard": { + "oneofs": { + "dataView": { + "oneof": [ + "gaugeView", + "sparkChartView" + ] + } + }, + "fields": { + "timeSeriesQuery": { + "type": "TimeSeriesQuery", + "id": 1 + }, + "gaugeView": { + "type": "GaugeView", + "id": 4 + }, + "sparkChartView": { + "type": "SparkChartView", + "id": 5 + }, + "thresholds": { + "rule": "repeated", + "type": "Threshold", + "id": 6 + } + }, + "nested": { + "GaugeView": { + "fields": { + "lowerBound": { + "type": "double", + "id": 1 + }, + "upperBound": { + "type": "double", + "id": 2 + } + } + }, + "SparkChartView": { + "fields": { + "sparkChartType": { + "type": "SparkChartType", + "id": 1 + }, + "minAlignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + } + } + }, "TimeSeriesQuery": { "oneofs": { "source": { @@ -1197,61 +1387,6 @@ "SPARK_BAR": 2 } }, - "Scorecard": { - "oneofs": { - "dataView": { - "oneof": [ - "gaugeView", - "sparkChartView" - ] - } - }, - "fields": { - "timeSeriesQuery": { - "type": "TimeSeriesQuery", - "id": 1 - }, - "gaugeView": { - "type": "GaugeView", - "id": 4 - }, - "sparkChartView": { - "type": "SparkChartView", - "id": 5 - }, - "thresholds": { - "rule": "repeated", - "type": "Threshold", - "id": 6 - } - }, - "nested": { - "GaugeView": { - "fields": { - "lowerBound": { - "type": "double", - "id": 1 - }, - "upperBound": { - "type": "double", - "id": 2 - } - } - }, - "SparkChartView": { - "fields": { - "sparkChartType": { - "type": "SparkChartType", - "id": 1 - }, - "minAlignmentPeriod": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - } - } - }, "Text": { "fields": { "content": { @@ -1378,141 +1513,6 @@ } } }, - "Widget": { - "oneofs": { - "content": { - "oneof": [ - "xyChart", - "scorecard", - "text", - "blank" - ] - } - }, - "fields": { - "title": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "xyChart": { - "type": "XyChart", - "id": 2 - }, - "scorecard": { - "type": "Scorecard", - "id": 3 - }, - "text": { - "type": "Text", - "id": 4 - }, - "blank": { - "type": "google.protobuf.Empty", - "id": 5 - } - } - }, - "GridLayout": { - "fields": { - "columns": { - "type": "int64", - "id": 1 - }, - "widgets": { - "rule": "repeated", - "type": "Widget", - "id": 2 - } - } - }, - "RowLayout": { - "fields": { - "rows": { - "rule": "repeated", - "type": "Row", - "id": 1 - } - }, - "nested": { - "Row": { - "fields": { - "weight": { - "type": "int64", - "id": 1 - }, - "widgets": { - "rule": "repeated", - "type": "Widget", - "id": 2 - } - } - } - } - }, - "ColumnLayout": { - "fields": { - "columns": { - "rule": "repeated", - "type": "Column", - "id": 1 - } - }, - "nested": { - "Column": { - "fields": { - "weight": { - "type": "int64", - "id": 1 - }, - "widgets": { - "rule": "repeated", - "type": "Widget", - "id": 2 - } - } - } - } - }, - "Dashboard": { - "oneofs": { - "layout": { - "oneof": [ - "gridLayout", - "rowLayout", - "columnLayout" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "etag": { - "type": "string", - "id": 4 - }, - "gridLayout": { - "type": "GridLayout", - "id": 5 - }, - "rowLayout": { - "type": "RowLayout", - "id": 8 - }, - "columnLayout": { - "type": "ColumnLayout", - "id": 9 - } - } - }, "DashboardsService": { "options": { "(google.api.default_host)": "monitoring.googleapis.com", diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index b431fd3635e..62f5c3cfc1d 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -743,9 +743,17 @@ export class DashboardsServiceClient { */ listDashboardsStream( request?: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); return this._descriptors.page.listDashboards.createStream( this._innerApiCalls.listDashboards as gax.GaxCall, diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json index 8d271522498..d13ec9f1cd3 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -1,13 +1,13 @@ [ "../../protos/google/monitoring/dashboard/v1/common.proto", + "../../protos/google/monitoring/dashboard/v1/dashboard.proto", + "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", + "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", + "../../protos/google/monitoring/dashboard/v1/layouts.proto", "../../protos/google/monitoring/dashboard/v1/metrics.proto", "../../protos/google/monitoring/dashboard/v1/scorecard.proto", + "../../protos/google/monitoring/dashboard/v1/service.proto", "../../protos/google/monitoring/dashboard/v1/text.proto", - "../../protos/google/monitoring/dashboard/v1/xychart.proto", "../../protos/google/monitoring/dashboard/v1/widget.proto", - "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", - "../../protos/google/monitoring/dashboard/v1/layouts.proto", - "../../protos/google/monitoring/dashboard/v1/dashboard.proto", - "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", - "../../protos/google/monitoring/dashboard/v1/service.proto" + "../../protos/google/monitoring/dashboard/v1/xychart.proto" ] diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index a5fee6943ac..951fd5d71d9 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-01-28T12:26:43.184397Z", + "updateTime": "2020-02-07T12:28:24.311536Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", - "internalRef": "291821782", - "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\n" + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856", + "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -28,274 +28,5 @@ "generator": "gapic-generator-typescript" } } - ], - "newFiles": [ - { - "path": ".eslintignore" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/publish.yml" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".gitignore" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".nycrc" - }, - { - "path": ".prettierignore" - }, - { - "path": ".prettierrc" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "LICENSE" - }, - { - "path": "README.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "package.json" - }, - { - "path": "protos/google/monitoring/dashboard/v1/common.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/dashboard.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/dashboards_service.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/drilldowns.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/layouts.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/metrics.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/scorecard.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/service.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/text.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/widget.proto" - }, - { - "path": "protos/google/monitoring/dashboard/v1/xychart.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/test/quickstart.js" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/dashboards_service_client.ts" - }, - { - "path": "src/v1/dashboards_service_client_config.json" - }, - { - "path": "src/v1/dashboards_service_proto_list.json" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "synth.metadata" - }, - { - "path": "synth.py" - }, - { - "path": "system-test/fixtures/sample/src/index.js" - }, - { - "path": "system-test/fixtures/sample/src/index.ts" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "test/gapic-dashboards_service-v1.ts" - }, - { - "path": "tsconfig.json" - }, - { - "path": "tslint.json" - }, - { - "path": "webpack.config.js" - } ] } \ No newline at end of file diff --git a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts index 35bcdd3470d..eedf591a2f7 100644 --- a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts @@ -91,6 +91,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -113,6 +114,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -137,6 +139,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -159,6 +162,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -183,6 +187,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -205,6 +210,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -279,6 +285,7 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock Grpc layer @@ -305,8 +312,9 @@ describe('v1.DashboardsServiceClient', () => { }); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; + request.parent = ''; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.listDashboards = ( actualRequest: {}, @@ -325,7 +333,7 @@ describe('v1.DashboardsServiceClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); }); From c8dae2743117992bfccb830cece87d9977557e35 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Feb 2020 18:04:59 +0100 Subject: [PATCH 018/181] chore(deps): update dependency linkinator to v2 --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 59aa9f33b23..b199040735c 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -39,7 +39,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", + "linkinator": "^2.0.0", "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", From 927272b66238c2f16566cab58ebd066ad2390de5 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 11 Feb 2020 22:34:59 -0800 Subject: [PATCH 019/181] build: add GitHub actions config for unit tests * build: add GitHub actions config for unit tests * chore: link root directory before linting * chore: also need to npm i --- packages/google-monitoring-dashboard/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b199040735c..20cb8c9b560 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -22,7 +22,8 @@ "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 && cd ../" + "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "google-gax": "^1.12.0" From f297135a882477dc04a6ecb139e9d080684df817 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 13 Feb 2020 09:23:27 -0800 Subject: [PATCH 020/181] feat: bump the release level to ga (#30) --- .../.repo-metadata.json | 2 +- packages/google-monitoring-dashboard/README.md | 11 ++++++----- .../google-monitoring-dashboard/synth.metadata | 15 +++++++++++---- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/google-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json index fd7d764d6df..e25b7e83623 100644 --- a/packages/google-monitoring-dashboard/.repo-metadata.json +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/monitoring/docs", "client_documentation": "https://googleapis.dev/nodejs/monitoring-dashboards/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-monitoring-dashboards", "distribution_name": "@google-cloud/monitoring-dashboards", diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 81f19ea8046..21d9f4b7e78 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -4,7 +4,7 @@ # [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) @@ -99,11 +99,12 @@ also contains samples. This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 951fd5d71d9..b39a2cac25b 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,13 +1,20 @@ { - "updateTime": "2020-02-07T12:28:24.311536Z", + "updateTime": "2020-02-13T05:43:59.254317Z", "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", + "sha": "e72d258e7c3b24345fb877ea14302afc89c9a532" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", - "internalRef": "293710856", - "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" + "sha": "0646bc775203077226c2c34d3e4d50cc4ec53660", + "internalRef": "294809380", + "log": "0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" } }, { From 0888a5fc0abdc0f9c0ad684e48535981c8d92147 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2020 12:12:06 -0800 Subject: [PATCH 021/181] chore: release 1.1.0 (#31) --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index c6b0fce8b1b..59ea170379d 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.2...v1.1.0) (2020-02-13) + + +### Features + +* bump the release level to ga ([#30](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/30)) ([c4080f7](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/c4080f7e2dbbcb5e42c928c4dfd5174d892975a2)) + ### [1.0.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.1...v1.0.2) (2020-01-28) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 20cb8c9b560..a9a8e558c90 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.0.2", + "version": "1.1.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 3876d42661b..70b981cd4de 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.0.2" + "@google-cloud/monitoring-dashboards": "^1.1.0" }, "devDependencies": { "c8": "^7.0.0", From a9220bb9dbb08907ff6f07039a38cb03fb4e39aa Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 26 Feb 2020 15:36:51 -0800 Subject: [PATCH 022/181] feat: export protos in src/index.ts --- packages/google-monitoring-dashboard/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index 2d93a8685ae..79f15e73fa2 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -22,3 +22,5 @@ export {v1, DashboardsServiceClient}; // For compatibility with JavaScript libraries we need to provide this default export: // tslint:disable-next-line no-default-export export default {v1, DashboardsServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; From 089d3019c98c6bc25333ad3d2d9d50651bd0ad6f Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 11:54:03 -0800 Subject: [PATCH 023/181] chore: update jsdoc.js (#38) --- packages/google-monitoring-dashboard/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index 33a405b53be..38d5afe8614 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -36,11 +36,14 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2018 Google, LLC.', + copyright: 'Copyright 2019 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/monitoring-dashboards', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From db76a2914ea78eb3a754217a48364fe32cb534a1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2020 19:56:05 +0000 Subject: [PATCH 024/181] chore: release 1.2.0 (#35) :robot: I have created a release \*beep\* \*boop\* --- ## [1.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.1.0...v1.2.0) (2020-02-27) ### Features * export protos in src/index.ts ([7a601bd](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/7a601bd1165e8be3e6f4beaea53c6e285d20942e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 59ea170379d..175b74ab910 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.1.0...v1.2.0) (2020-02-27) + + +### Features + +* export protos in src/index.ts ([7a601bd](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/7a601bd1165e8be3e6f4beaea53c6e285d20942e)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.0.2...v1.1.0) (2020-02-13) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index a9a8e558c90..bde65efadd5 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.1.0", + "version": "1.2.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 70b981cd4de..d68f6a6de75 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.1.0" + "@google-cloud/monitoring-dashboards": "^1.2.0" }, "devDependencies": { "c8": "^7.0.0", From 2c1fe0386a2e30bb888efb8a9f81248a0e811b85 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 16:33:28 -0800 Subject: [PATCH 025/181] chore: update jsdoc with macro license (#41) --- packages/google-monitoring-dashboard/.jsdoc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index 38d5afe8614..c3daadee467 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -12,6 +12,9 @@ // 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'; From 3bc0626f67f1ae3302f49728b6e71f93168ed608 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 29 Feb 2020 10:53:35 -0800 Subject: [PATCH 026/181] chore: update .jsdoc.js --- packages/google-monitoring-dashboard/.jsdoc.js | 5 +++-- .../google-monitoring-dashboard/synth.metadata | 15 ++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index c3daadee467..d4246ffbc78 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -34,7 +34,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -45,7 +46,7 @@ module.exports = { systemName: '@google-cloud/monitoring-dashboards', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index b39a2cac25b..a1a85d56b5b 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,20 +1,13 @@ { - "updateTime": "2020-02-13T05:43:59.254317Z", + "updateTime": "2020-02-29T12:34:04.488299Z", "sources": [ - { - "git": { - "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", - "sha": "e72d258e7c3b24345fb877ea14302afc89c9a532" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0646bc775203077226c2c34d3e4d50cc4ec53660", - "internalRef": "294809380", - "log": "0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\n" + "sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080", + "internalRef": "297918498", + "log": "83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n" } }, { From 80e5172660f20447ad765a84212c2bc945e40519 Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:10:13 +0000 Subject: [PATCH 027/181] feat: deferred client initialization (#43) This PR includes changes from https://github.com/googleapis/gapic-generator-typescript/pull/317 that will move the asynchronous initialization and authentication from the client constructor to an `initialize()` method. This method will be automatically called when the first RPC call is performed. The client library usage has not changed, there is no need to update any code. If you want to make sure the client is authenticated _before_ the first RPC call, you can do ```js await client.initialize(); ``` manually before calling any client method. --- .../src/v1/dashboards_service_client.ts | 74 ++++++++++++++----- .../synth.metadata | 8 +- .../test/gapic-dashboards_service-v1.ts | 36 +++++++++ 3 files changed, 94 insertions(+), 24 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 62f5c3cfc1d..27965415d03 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -44,8 +44,13 @@ export class DashboardsServiceClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; 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; - dashboardsServiceStub: Promise<{[name: string]: Function}>; + dashboardsServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of DashboardsServiceClient. @@ -69,8 +74,6 @@ export class DashboardsServiceClient { * 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 {function} [options.promise] - Custom promise module to use instead - * of native Promises. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ @@ -100,25 +103,28 @@ export class DashboardsServiceClient { // If we are in browser, we are already using fallback because of the // "browser" field in package.json. // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = (this.constructor as typeof DashboardsServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { - clientHeader.push(`gl-web/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -134,7 +140,7 @@ export class DashboardsServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -142,7 +148,7 @@ export class DashboardsServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listDashboards: new gaxModule.PageDescriptor( + listDashboards: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'dashboards' @@ -150,7 +156,7 @@ export class DashboardsServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.dashboard.v1.DashboardsService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -161,17 +167,36 @@ export class DashboardsServiceClient { // 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.dashboardsServiceStub) { + return this.dashboardsServiceStub; + } // Put together the "service stub" for // google.monitoring.dashboard.v1.DashboardsService. - this.dashboardsServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.dashboardsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.dashboard.v1.DashboardsService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.dashboard.v1.DashboardsService, - opts + (this._protos as any).google.monitoring.dashboard.v1 + .DashboardsService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -197,9 +222,9 @@ export class DashboardsServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -213,6 +238,8 @@ export class DashboardsServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.dashboardsServiceStub; } /** @@ -356,6 +383,7 @@ export class DashboardsServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createDashboard(request, options, callback); } getDashboard( @@ -443,6 +471,7 @@ export class DashboardsServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getDashboard(request, options, callback); } deleteDashboard( @@ -528,6 +557,7 @@ export class DashboardsServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteDashboard(request, options, callback); } updateDashboard( @@ -612,6 +642,7 @@ export class DashboardsServiceClient { ] = gax.routingHeader.fromParams({ 'dashboard.name': request.dashboard!.name || '', }); + this.initialize(); return this._innerApiCalls.updateDashboard(request, options, callback); } @@ -708,6 +739,7 @@ export class DashboardsServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listDashboards(request, options, callback); } @@ -755,6 +787,7 @@ export class DashboardsServiceClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listDashboards.createStream( this._innerApiCalls.listDashboards as gax.GaxCall, request, @@ -768,8 +801,9 @@ export class DashboardsServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.dashboardsServiceStub.then(stub => { + return this.dashboardsServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index a1a85d56b5b..8783c11733b 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,13 +1,13 @@ { - "updateTime": "2020-02-29T12:34:04.488299Z", + "updateTime": "2020-03-05T23:11:36.313720Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080", - "internalRef": "297918498", - "log": "83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n" + "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", + "internalRef": "299181282", + "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n" } }, { diff --git a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts index eedf591a2f7..c5c236f517c 100644 --- a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts @@ -83,12 +83,30 @@ describe('v1.DashboardsServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dashboardsServiceStub, undefined); + await client.initialize(); + assert(client.dashboardsServiceStub); + }); + it('has close method', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('createDashboard', () => { it('invokes createDashboard without error', done => { const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; request.parent = ''; @@ -112,6 +130,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; request.parent = ''; @@ -137,6 +157,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; request.name = ''; @@ -160,6 +182,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; request.name = ''; @@ -185,6 +209,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; request.name = ''; @@ -208,6 +234,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; request.name = ''; @@ -233,6 +261,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; request.dashboard = {}; @@ -257,6 +287,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; request.dashboard = {}; @@ -283,6 +315,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; request.parent = ''; @@ -310,6 +344,8 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; request.parent = ''; From ae41cde5b55ff1bc3247280b318b213230261c60 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 5 Mar 2020 17:24:40 -0800 Subject: [PATCH 028/181] build: update linkinator config (#45) --- packages/google-monitoring-dashboard/linkinator.config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json index b555215ca02..29a223b6db6 100644 --- a/packages/google-monitoring-dashboard/linkinator.config.json +++ b/packages/google-monitoring-dashboard/linkinator.config.json @@ -4,5 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } From bb85e8243730ac4f93438f4dfd3fca745237a5ec Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Mar 2020 14:57:54 -0800 Subject: [PATCH 029/181] build(tests): fix coveralls and enable build cop (#46) --- .../google-monitoring-dashboard/.mocharc.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/google-monitoring-dashboard/.mocharc.js diff --git a/packages/google-monitoring-dashboard/.mocharc.js b/packages/google-monitoring-dashboard/.mocharc.js new file mode 100644 index 00000000000..ff7b34fa5d1 --- /dev/null +++ b/packages/google-monitoring-dashboard/.mocharc.js @@ -0,0 +1,28 @@ +// 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 +} +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 From 09cc1d02d12ab13fc91a42c6b8c2e02b99fe9906 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2020 00:08:09 +0000 Subject: [PATCH 030/181] chore: release 1.3.0 (#44) :robot: I have created a release \*beep\* \*boop\* --- ## [1.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.2.0...v1.3.0) (2020-03-06) ### Features * deferred client initialization ([#43](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/43)) ([63a9eaa](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/63a9eaa8cc7d3afc9cb203027a4d7076e1c1c970)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 175b74ab910..7f580495cef 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.2.0...v1.3.0) (2020-03-06) + + +### Features + +* deferred client initialization ([#43](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/43)) ([63a9eaa](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/63a9eaa8cc7d3afc9cb203027a4d7076e1c1c970)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.1.0...v1.2.0) (2020-02-27) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index bde65efadd5..bbcbf60f9b4 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.2.0", + "version": "1.3.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index d68f6a6de75..df1273983f4 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.2.0" + "@google-cloud/monitoring-dashboards": "^1.3.0" }, "devDependencies": { "c8": "^7.0.0", From 74f6063718afaa64e05b77a421b940ebe9f7d268 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 18 Mar 2020 12:59:12 -0700 Subject: [PATCH 031/181] docs: mention templates in contributing section of README (#48) --- packages/google-monitoring-dashboard/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 21d9f4b7e78..68c32b3b5f7 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -117,6 +117,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring-dashboards/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 From e4ca994e433dbc4ceb26add4ac210125fa2d713f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 19 Mar 2020 08:54:35 -0700 Subject: [PATCH 032/181] chore: remove snippet leading whitespace (#50) --- .../google-monitoring-dashboard/README.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 68c32b3b5f7..2b5035da046 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -55,26 +55,26 @@ npm install @google-cloud/monitoring-dashboards ### Using the client library ```javascript - // Imports the Google Cloud client library - const { - DashboardsServiceClient, - } = require('@google-cloud/monitoring-dashboards'); - - // Creates a client - const ds = new DashboardsServiceClient(); - - // parent = 'projects/my-project', // Project to list dashboards for. - - async function listDashboards() { - const [dashboards] = await ds.listDashboards({ - parent, - }); - console.info('Listing Dashboards:'); - for (const dashboard of dashboards) { - console.info(`\t${dashboard.displayName}`); - } +// Imports the Google Cloud client library +const { + DashboardsServiceClient, +} = require('@google-cloud/monitoring-dashboards'); + +// Creates a client +const ds = new DashboardsServiceClient(); + +// parent = 'projects/my-project', // Project to list dashboards for. + +async function listDashboards() { + const [dashboards] = await ds.listDashboards({ + parent, + }); + console.info('Listing Dashboards:'); + for (const dashboard of dashboards) { + console.info(`\t${dashboard.displayName}`); } - listDashboards(); +} +listDashboards(); ``` From 5b556f136b237f7437a07afd0b042b53d25ef162 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:32:36 -0700 Subject: [PATCH 033/181] docs: document version support goals (#55) --- .../google-monitoring-dashboard/README.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 2b5035da046..cdfea8a2950 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -94,6 +94,27 @@ has instructions for running the samples. The [Monitoring Dashboards 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 targetting 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/). From f6b60be768226c77f3c44a28768a6e847a1b4fc2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Mar 2020 01:13:54 -0700 Subject: [PATCH 034/181] chore: regenerate the code (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-22 04:36:58,445 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. 2020-03-22 04:36:58,498 synthtool > Ensuring dependencies. 2020-03-22 04:36:58,502 synthtool > Cloning googleapis. 2020-03-22 04:36:59,156 synthtool > Pulling Docker image: gapic-generator-typescript:latest latest: Pulling from gapic-images/gapic-generator-typescript Digest: sha256:3762b8bcba247ef4d020ffc7043e2881a20b5fab0ffd98d542f365d3f3a3829d Status: Image is up to date for gcr.io/gapic-images/gapic-generator-typescript:latest 2020-03-22 04:37:00,077 synthtool > Generating code for: google/monitoring/dashboard/v1. 2020-03-22 04:37:01,297 synthtool > Generated code into /tmpfs/tmp/tmp70u2161_. .eslintignore .eslintrc.yml .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/publish.yml .github/release-please.yml .github/workflows/ci.yaml .kokoro/common.cfg .kokoro/continuous/node10/common.cfg .kokoro/continuous/node10/docs.cfg .kokoro/continuous/node10/lint.cfg .kokoro/continuous/node10/samples-test.cfg .kokoro/continuous/node10/system-test.cfg .kokoro/continuous/node10/test.cfg .kokoro/continuous/node12/common.cfg .kokoro/continuous/node12/test.cfg .kokoro/continuous/node8/common.cfg .kokoro/continuous/node8/test.cfg .kokoro/docs.sh .kokoro/lint.sh .kokoro/presubmit/node10/common.cfg .kokoro/presubmit/node10/docs.cfg .kokoro/presubmit/node10/lint.cfg .kokoro/presubmit/node10/samples-test.cfg .kokoro/presubmit/node10/system-test.cfg .kokoro/presubmit/node10/test.cfg .kokoro/presubmit/node12/common.cfg .kokoro/presubmit/node12/test.cfg .kokoro/presubmit/node8/common.cfg .kokoro/presubmit/node8/test.cfg .kokoro/presubmit/windows/common.cfg .kokoro/presubmit/windows/test.cfg .kokoro/publish.sh .kokoro/release/docs.cfg .kokoro/release/docs.sh .kokoro/release/publish.cfg .kokoro/samples-test.sh .kokoro/system-test.sh .kokoro/test.bat .kokoro/test.sh .kokoro/trampoline.sh .mocharc.js .nycrc .prettierignore .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml renovate.json samples/README.md npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > protobufjs@6.8.9 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs > node scripts/postinstall > @google-cloud/monitoring-dashboards@1.3.0 prepare /tmpfs/src/git/autosynth/working_repo > npm run compile-protos && npm run compile npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/monitoring-dashboards@1.3.0 compile-protos /tmpfs/src/git/autosynth/working_repo > compileProtos src installing semver@^5.5.0 installing uglify-js@^3.3.25 installing espree@^3.5.4 installing escodegen@^1.9.1 npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/monitoring-dashboards@1.3.0 compile /tmpfs/src/git/autosynth/working_repo > tsc -p . && cp -r protos build/ npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/abbrev): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/abbrev' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.abbrev.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ansi-regex@2.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ansi-regex' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ansi-regex.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: aproba@1.2.0 (node_modules/watchpack/node_modules/fsevents/node_modules/aproba): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/aproba' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.aproba.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: balanced-match@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/balanced-match' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.balanced-match.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: chownr@1.1.4 (node_modules/watchpack/node_modules/fsevents/node_modules/chownr): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/chownr' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.chownr.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: code-point-at@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/code-point-at' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.code-point-at.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: concat-map@0.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/concat-map): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/concat-map' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.concat-map.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: console-control-strings@1.1.0 (node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/console-control-strings' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.console-control-strings.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: core-util-is@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/core-util-is' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.core-util-is.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: deep-extend@0.6.0 (node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/deep-extend' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.deep-extend.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: delegates@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/delegates): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/delegates' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.delegates.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-libc@1.0.3 (node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/detect-libc' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.detect-libc.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs.realpath@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/fs.realpath' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.fs.realpath.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: has-unicode@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/has-unicode' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.has-unicode.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inherits@2.0.4 (node_modules/watchpack/node_modules/fsevents/node_modules/inherits): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/inherits' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.inherits.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ini@1.3.5 (node_modules/watchpack/node_modules/fsevents/node_modules/ini): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ini' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ini.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: isarray@1.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/isarray): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/isarray' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.isarray.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@1.2.5 (node_modules/watchpack/node_modules/fsevents/node_modules/minimist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/minimist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.minimist.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ms@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/ms): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/ms' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.ms.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm-normalize-package-bin@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/npm-normalize-package-bin' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.npm-normalize-package-bin.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: number-is-nan@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/number-is-nan' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.number-is-nan.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: object-assign@4.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/object-assign): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/object-assign' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.object-assign.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-homedir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-homedir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-homedir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: os-tmpdir@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/os-tmpdir' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.os-tmpdir.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: path-is-absolute@1.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/path-is-absolute' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.path-is-absolute.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: process-nextick-args@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/process-nextick-args' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.process-nextick-args.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safe-buffer@5.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safe-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safe-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: safer-buffer@2.1.2 (node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/safer-buffer' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.safer-buffer.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sax@1.2.4 (node_modules/watchpack/node_modules/fsevents/node_modules/sax): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/sax' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.sax.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: semver@5.7.1 (node_modules/watchpack/node_modules/fsevents/node_modules/semver): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/semver' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.semver.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: set-blocking@2.0.0 (node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/set-blocking' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.set-blocking.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: signal-exit@3.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/signal-exit' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.signal-exit.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: strip-json-comments@2.0.1 (node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/strip-json-comments' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.strip-json-comments.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: util-deprecate@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/util-deprecate' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.util-deprecate.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wrappy@1.0.2 (node_modules/watchpack/node_modules/fsevents/node_modules/wrappy): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/wrappy' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.wrappy.DELETE' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: yallist@3.1.1 (node_modules/watchpack/node_modules/fsevents/node_modules/yallist): npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/yallist' -> '/tmpfs/src/git/autosynth/working_repo/node_modules/watchpack/node_modules/fsevents/node_modules/.yallist.DELETE' added 967 packages from 454 contributors and audited 6746 packages in 27.334s found 0 vulnerabilities npm WARN npm npm does not support Node.js v12.16.1 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11. npm WARN npm You can find the latest version at https://nodejs.org/ > @google-cloud/monitoring-dashboards@1.3.0 fix /tmpfs/src/git/autosynth/working_repo > gts fix && eslint samples --fix /tmpfs/src/git/autosynth/working_repo/samples/quickstart.js 25:15 error "@google-cloud/monitoring-dashboards" is not found node/no-missing-require /tmpfs/src/git/autosynth/working_repo/samples/test/quickstart.js 19:26 error "chai" is not found node/no-missing-require ✖ 2 problems (2 errors, 0 warnings) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @google-cloud/monitoring-dashboards@1.3.0 fix: `gts fix && eslint samples --fix` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @google-cloud/monitoring-dashboards@1.3.0 fix script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/kbuilder/.npm/_logs/2020-03-22T11_37_34_706Z-debug.log 2020-03-22 04:37:37,870 synthtool > Wrote metadata to synth.metadata. ```
--- packages/google-monitoring-dashboard/.jsdoc.js | 2 +- .../google-monitoring-dashboard/src/index.ts | 2 +- .../src/v1/dashboards_service_client.ts | 12 +++++++++--- .../google-monitoring-dashboard/src/v1/index.ts | 2 +- .../google-monitoring-dashboard/synth.metadata | 16 ++++++++-------- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic-dashboards_service-v1.ts | 2 +- .../webpack.config.js | 2 +- 10 files changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index d4246ffbc78..bdab09eaa14 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index 79f15e73fa2..0ec9e1ffbe2 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 27965415d03..1b2fac48d52 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. @@ -41,7 +41,12 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class DashboardsServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; @@ -215,7 +220,8 @@ export class DashboardsServiceClient { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; diff --git a/packages/google-monitoring-dashboard/src/v1/index.ts b/packages/google-monitoring-dashboard/src/v1/index.ts index 359487375b2..5e8b1155e51 100644 --- a/packages/google-monitoring-dashboard/src/v1/index.ts +++ b/packages/google-monitoring-dashboard/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 8783c11733b..ba4a58f4e34 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-03-05T23:11:36.313720Z", + "updateTime": "2020-03-22T11:37:37.870028Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282", - "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871", + "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js index 4a5f6deb3ef..98ded0014e2 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts index af23d763c46..ecf043fa0ab 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts index c9aa74ec221..c4d80e9c0c8 100644 --- a/packages/google-monitoring-dashboard/system-test/install.ts +++ b/packages/google-monitoring-dashboard/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts index c5c236f517c..565c9593ccf 100644 --- a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. diff --git a/packages/google-monitoring-dashboard/webpack.config.js b/packages/google-monitoring-dashboard/webpack.config.js index f91876850d2..e14d944637c 100644 --- a/packages/google-monitoring-dashboard/webpack.config.js +++ b/packages/google-monitoring-dashboard/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// 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. From c32198873170dcb6772d59be09591b5f1d83d126 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 31 Mar 2020 13:45:44 -0700 Subject: [PATCH 035/181] feat!: drop node8 support, support for async iterators (#58) BREAKING CHANGE: The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. New feature: methods with pagination now support async iteration. --- .../.eslintrc.json | 3 + .../google-monitoring-dashboard/.eslintrc.yml | 15 - .../google-monitoring-dashboard/.prettierrc | 8 - .../.prettierrc.js | 17 + .../google-monitoring-dashboard/package.json | 8 +- .../google-monitoring-dashboard/src/index.ts | 2 - .../src/v1/dashboards_service_client.ts | 373 ++++--- .../synth.metadata | 20 +- .../system-test/fixtures/sample/src/index.js | 1 - .../system-test/fixtures/sample/src/index.ts | 2 +- .../test/gapic-dashboards_service-v1.ts | 375 ------- .../test/gapic_dashboards_service_v1.ts | 975 ++++++++++++++++++ .../webpack.config.js | 12 +- 13 files changed, 1237 insertions(+), 574 deletions(-) create mode 100644 packages/google-monitoring-dashboard/.eslintrc.json delete mode 100644 packages/google-monitoring-dashboard/.eslintrc.yml delete mode 100644 packages/google-monitoring-dashboard/.prettierrc create mode 100644 packages/google-monitoring-dashboard/.prettierrc.js delete mode 100644 packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts create mode 100644 packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts diff --git a/packages/google-monitoring-dashboard/.eslintrc.json b/packages/google-monitoring-dashboard/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-monitoring-dashboard/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-monitoring-dashboard/.eslintrc.yml b/packages/google-monitoring-dashboard/.eslintrc.yml deleted file mode 100644 index 73eeec27612..00000000000 --- a/packages/google-monitoring-dashboard/.eslintrc.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -extends: - - 'eslint:recommended' - - 'plugin:node/recommended' - - prettier -plugins: - - node - - prettier -rules: - prettier/prettier: error - block-scoped-var: error - eqeqeq: error - no-warning-comments: warn - no-var: error - prefer-const: error diff --git a/packages/google-monitoring-dashboard/.prettierrc b/packages/google-monitoring-dashboard/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/packages/google-monitoring-dashboard/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/packages/google-monitoring-dashboard/.prettierrc.js b/packages/google-monitoring-dashboard/.prettierrc.js new file mode 100644 index 00000000000..08cba3775be --- /dev/null +++ b/packages/google-monitoring-dashboard/.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 +// +// 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index bbcbf60f9b4..1b6994e3d90 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -26,17 +26,18 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^1.12.0" + "google-gax": "^2.0.1" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", + "@types/sinon": "^7.5.2", "c8": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.9.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", - "gts": "^1.0.0", + "gts": "2.0.0-alpha.9", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", @@ -45,8 +46,9 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.19.1", + "sinon": "^9.0.1", "ts-loader": "^6.2.1", - "typescript": "~3.6.4", + "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" }, diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index 0ec9e1ffbe2..5fc0ce0306e 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -19,8 +19,6 @@ import * as v1 from './v1'; const DashboardsServiceClient = v1.DashboardsServiceClient; export {v1, DashboardsServiceClient}; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export export default {v1, DashboardsServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 1b2fac48d52..1c32c3dd02d 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -18,18 +18,18 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './dashboards_service_client_config.json'; const version = require('../../../package.json').version; @@ -41,13 +41,6 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class DashboardsServiceClient { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -55,6 +48,13 @@ export class DashboardsServiceClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; dashboardsServiceStub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +146,16 @@ export class DashboardsServiceClient { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + 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 = { + this.descriptors.page = { listDashboards: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -171,7 +174,7 @@ export class DashboardsServiceClient { // 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 = {}; + this.innerApiCalls = {}; } /** @@ -198,7 +201,7 @@ export class DashboardsServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.dashboard.v1.DashboardsService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.dashboard.v1 .DashboardsService, this._opts @@ -213,9 +216,8 @@ export class DashboardsServiceClient { 'deleteDashboard', 'updateDashboard', ]; - for (const methodName of dashboardsServiceStubMethods) { - const innerCallPromise = this.dashboardsServiceStub.then( + const callPromise = this.dashboardsServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -229,20 +231,14 @@ export class DashboardsServiceClient { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.dashboardsServiceStub; @@ -304,26 +300,34 @@ export class DashboardsServiceClient { // -- Service calls -- // ------------------- createDashboard( - request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | undefined, {} | undefined ] >; createDashboard( - request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createDashboard( + request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, + callback: Callback< + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -348,28 +352,27 @@ export class DashboardsServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createDashboard( - request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.ICreateDashboardRequest | undefined, {} | undefined ] > | void { @@ -390,29 +393,37 @@ export class DashboardsServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createDashboard(request, options, callback); + return this.innerApiCalls.createDashboard(request, options, callback); } getDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.IGetDashboardRequest | undefined, {} | undefined ] >; getDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IGetDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getDashboard( + request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, + callback: Callback< + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IGetDashboardRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -436,28 +447,27 @@ export class DashboardsServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IGetDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IGetDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.IGetDashboardRequest | undefined, {} | undefined ] > | void { @@ -478,29 +488,37 @@ export class DashboardsServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getDashboard(request, options, callback); + return this.innerApiCalls.getDashboard(request, options, callback); } deleteDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | undefined, {} | undefined ] >; deleteDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteDashboard( + request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -522,28 +540,27 @@ export class DashboardsServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest | undefined, {} | undefined ] > | void { @@ -564,29 +581,37 @@ export class DashboardsServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteDashboard(request, options, callback); + return this.innerApiCalls.deleteDashboard(request, options, callback); } updateDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | undefined, {} | undefined ] >; updateDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateDashboard( + request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + callback: Callback< + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -607,28 +632,27 @@ export class DashboardsServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateDashboard( - request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard, - | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest + protos.google.monitoring.dashboard.v1.IDashboard, + | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard, - ( - | protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest - | undefined - ), + protos.google.monitoring.dashboard.v1.IDashboard, + protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest | undefined, {} | undefined ] > | void { @@ -649,26 +673,38 @@ export class DashboardsServiceClient { 'dashboard.name': request.dashboard!.name || '', }); this.initialize(); - return this._innerApiCalls.updateDashboard(request, options, callback); + return this.innerApiCalls.updateDashboard(request, options, callback); } listDashboards( - request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard[], - protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + protos.google.monitoring.dashboard.v1.IDashboard[], + protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protos.google.monitoring.dashboard.v1.IListDashboardsResponse ] >; listDashboards( - request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard[], - protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + callback: PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard + > + ): void; + listDashboards( + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + callback: PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard > ): void; /** @@ -709,24 +745,28 @@ export class DashboardsServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listDashboards( - request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard[], - protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + | PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard >, - callback?: Callback< - protosTypes.google.monitoring.dashboard.v1.IDashboard[], - protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + callback?: PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard > ): Promise< [ - protosTypes.google.monitoring.dashboard.v1.IDashboard[], - protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protosTypes.google.monitoring.dashboard.v1.IListDashboardsResponse + protos.google.monitoring.dashboard.v1.IDashboard[], + protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protos.google.monitoring.dashboard.v1.IListDashboardsResponse ] > | void { request = request || {}; @@ -746,7 +786,7 @@ export class DashboardsServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listDashboards(request, options, callback); + return this.innerApiCalls.listDashboards(request, options, callback); } /** @@ -780,7 +820,7 @@ export class DashboardsServiceClient { * An object stream which emits an object representing [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard} on 'data' event. */ listDashboardsStream( - request?: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest, + request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -794,13 +834,58 @@ export class DashboardsServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listDashboards.createStream( - this._innerApiCalls.listDashboards as gax.GaxCall, + return this.descriptors.page.listDashboards.createStream( + this.innerApiCalls.listDashboards as gax.GaxCall, request, callSettings ); } + /** + * Equivalent to {@link listDashboards}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The scope of the dashboards to list. A project scope must be + * specified in the form of `"projects/{project_id_or_number}"`. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * If unspecified, a default of 1000 is used. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listDashboardsAsync( + request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listDashboards.asyncIterate( + this.innerApiCalls['listDashboards'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index ba4a58f4e34..69486a99f95 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,23 +1,5 @@ { - "updateTime": "2020-03-22T11:37:37.870028Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", - "internalRef": "302154871", - "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" - } - } - ], + "updateTime": "2020-03-31T19:51:10.689331Z", "destinations": [ { "client": { diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js index 98ded0014e2..1c359c87e21 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const dashboard = require('@google-cloud/monitoring-dashboards'); diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts index ecf043fa0ab..0b1b792a12c 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {DashboardsServiceClient} from '@google-cloud/monitoring-dashboards'; function main() { - const dashboardsServiceClient = new DashboardsServiceClient(); + new DashboardsServiceClient(); } main(); diff --git a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts b/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts deleted file mode 100644 index 565c9593ccf..00000000000 --- a/packages/google-monitoring-dashboard/test/gapic-dashboards_service-v1.ts +++ /dev/null @@ -1,375 +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 -// -// 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 protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const dashboardsserviceModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -describe('v1.DashboardsServiceClient', () => { - it('has servicePath', () => { - const servicePath = - dashboardsserviceModule.v1.DashboardsServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - dashboardsserviceModule.v1.DashboardsServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = dashboardsserviceModule.v1.DashboardsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dashboardsServiceStub, undefined); - await client.initialize(); - assert(client.dashboardsServiceStub); - }); - it('has close method', () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('createDashboard', () => { - it('invokes createDashboard without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDashboard = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createDashboard(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createDashboard with error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.ICreateDashboardRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createDashboard = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createDashboard(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getDashboard', () => { - it('invokes getDashboard without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDashboard = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getDashboard(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getDashboard with error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IGetDashboardRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getDashboard = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getDashboard(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteDashboard', () => { - it('invokes deleteDashboard without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDashboard = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteDashboard(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteDashboard with error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IDeleteDashboardRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteDashboard = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteDashboard(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateDashboard', () => { - it('invokes updateDashboard without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; - request.dashboard = {}; - request.dashboard.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDashboard = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateDashboard(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateDashboard with error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IUpdateDashboardRequest = {}; - request.dashboard = {}; - request.dashboard.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateDashboard = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateDashboard(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listDashboards', () => { - it('invokes listDashboards without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listDashboards = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listDashboards(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listDashboardsStream', () => { - it('invokes listDashboardsStream without error', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.dashboard.v1.IListDashboardsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listDashboards = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listDashboardsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts new file mode 100644 index 00000000000..1974ab3d6f0 --- /dev/null +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -0,0 +1,975 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dashboardsserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DashboardsServiceClient', () => { + it('has servicePath', () => { + const servicePath = + dashboardsserviceModule.v1.DashboardsServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + dashboardsserviceModule.v1.DashboardsServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = dashboardsserviceModule.v1.DashboardsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dashboardsServiceStub, undefined); + await client.initialize(); + assert(client.dashboardsServiceStub); + }); + + it('has close method', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + 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 dashboardsserviceModule.v1.DashboardsServiceClient({ + 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('createDashboard', () => { + it('invokes createDashboard without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.createDashboard = stubSimpleCall(expectedResponse); + const [response] = await client.createDashboard(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createDashboard without error using callback', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.createDashboard = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createDashboard( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.dashboard.v1.IDashboard | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createDashboard with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createDashboard = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createDashboard(request); + }, expectedError); + assert( + (client.innerApiCalls.createDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getDashboard', () => { + it('invokes getDashboard without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.GetDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.getDashboard = stubSimpleCall(expectedResponse); + const [response] = await client.getDashboard(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getDashboard without error using callback', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.GetDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.getDashboard = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getDashboard( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.dashboard.v1.IDashboard | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getDashboard with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.GetDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getDashboard = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getDashboard(request); + }, expectedError); + assert( + (client.innerApiCalls.getDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteDashboard', () => { + it('invokes deleteDashboard without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDashboard = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDashboard(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteDashboard without error using callback', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDashboard = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteDashboard( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteDashboard with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDashboard = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteDashboard(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateDashboard', () => { + it('invokes updateDashboard without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() + ); + request.dashboard = {}; + request.dashboard.name = ''; + const expectedHeaderRequestParams = 'dashboard.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.updateDashboard = stubSimpleCall(expectedResponse); + const [response] = await client.updateDashboard(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateDashboard without error using callback', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() + ); + request.dashboard = {}; + request.dashboard.name = ''; + const expectedHeaderRequestParams = 'dashboard.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ); + client.innerApiCalls.updateDashboard = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateDashboard( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.dashboard.v1.IDashboard | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateDashboard with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() + ); + request.dashboard = {}; + request.dashboard.name = ''; + const expectedHeaderRequestParams = 'dashboard.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDashboard = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateDashboard(request); + }, expectedError); + assert( + (client.innerApiCalls.updateDashboard as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listDashboards', () => { + it('invokes listDashboards without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + ]; + client.innerApiCalls.listDashboards = stubSimpleCall(expectedResponse); + const [response] = await client.listDashboards(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDashboards as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDashboards without error using callback', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + ]; + client.innerApiCalls.listDashboards = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listDashboards( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.dashboard.v1.IDashboard[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listDashboards as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listDashboards with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listDashboards = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listDashboards(request); + }, expectedError); + assert( + (client.innerApiCalls.listDashboards as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listDashboardsStream without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + ]; + client.descriptors.page.listDashboards.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listDashboardsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.dashboard.v1.Dashboard[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.dashboard.v1.Dashboard) => { + 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.listDashboards.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDashboards, request) + ); + assert.strictEqual( + (client.descriptors.page.listDashboards + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listDashboardsStream with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDashboards.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listDashboardsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.dashboard.v1.Dashboard[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.dashboard.v1.Dashboard) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listDashboards.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDashboards, request) + ); + assert.strictEqual( + (client.descriptors.page.listDashboards + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDashboards without error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + generateSampleMessage( + new protos.google.monitoring.dashboard.v1.Dashboard() + ), + ]; + client.descriptors.page.listDashboards.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = []; + const iterable = client.listDashboardsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDashboards + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDashboards + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listDashboards with error', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listDashboards.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listDashboardsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDashboards + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listDashboards + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); +}); diff --git a/packages/google-monitoring-dashboard/webpack.config.js b/packages/google-monitoring-dashboard/webpack.config.js index e14d944637c..d5f4b8ce540 100644 --- a/packages/google-monitoring-dashboard/webpack.config.js +++ b/packages/google-monitoring-dashboard/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From 63b538c290a2aad5c08f0c7d448a4ec0be189a80 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:37:03 -0700 Subject: [PATCH 036/181] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#60) --- packages/google-monitoring-dashboard/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index 3dfe3288496..fd25b12d2a8 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -20,6 +20,9 @@ logging.basicConfig(level=logging.DEBUG) +AUTOSYNTH_MULTIPLE_COMMITS = True + + # run the gapic generator gapic = gcp.GAPICMicrogenerator() versions = ['v1'] From 98982381d0e20ee1f3c1e931d1bd981c3427f8aa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 23:36:14 +0200 Subject: [PATCH 037/181] chore(deps): update dependency @types/sinon to v9 (#61) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.5.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/7.5.2/9.0.0) | --- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 1b6994e3d90..084f9312f21 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -31,7 +31,7 @@ "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "c8": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.9.0", From dde48f73a8168534a4c9db82e53d2bb2441570c8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:46:45 -0700 Subject: [PATCH 038/181] chore: remove duplicate mocha config (#64) --- packages/google-monitoring-dashboard/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/google-monitoring-dashboard/.mocharc.json diff --git a/packages/google-monitoring-dashboard/.mocharc.json b/packages/google-monitoring-dashboard/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/packages/google-monitoring-dashboard/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From ee1bebd97f23ae5b1f3fd9e7be06c64655626a58 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 7 Apr 2020 00:06:20 -0700 Subject: [PATCH 039/181] fix: export explicit version from protos.js (#63) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1630485f-7526-4afd-9c13-b5660664d6a2/targets --- .../protos/protos.js | 2 +- .../synth.metadata | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 989dd4087d1..48c059e1f1c 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_monitoring_dashboards_1_3_0_protos || ($protobuf.roots._google_cloud_monitoring_dashboards_1_3_0_protos = {}); $root.google = (function() { diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 69486a99f95..6bd6cd781d8 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,5 +1,22 @@ { - "updateTime": "2020-03-31T19:51:10.689331Z", + "updateTime": "2020-04-03T11:56:37.405558Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", + "internalRef": "304500143" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + } + } + ], "destinations": [ { "client": { From 3b7c0eb088bad5620301b2f29caa0440308de7ba Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:58:56 +0200 Subject: [PATCH 040/181] chore(deps): update dependency gts to v2.0.0 (#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [gts](https://togithub.com/google/gts) | devDependencies | patch | [`2.0.0-alpha.9` -> `2.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.0-alpha.9/2.0.0) | --- ### Release Notes
google/gts ### [`v2.0.0`](https://togithub.com/google/gts/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgooglegtscomparev112v200-2020-04-02) [Compare Source](https://togithub.com/google/gts/compare/39a2705e51b4b6329a70f91f8293a2d7a363bf5d...v2.0.0) ##### ⚠ BREAKING CHANGES ⚠ This is a major rewrite of the tool. Based on community guidance, we've switched from using [tslint](https://palantir.github.io/tslint/) to [eslint](https://eslint.org/). _Please read all of the steps below to upgrade_. ##### Configuring `eslint` With the shift to `eslint`, `gts` now will format and lint JavaScript _as well_ as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run: $ npx gts fix To specify only TypeScript: $ npx gts fix '**/*.ts' ##### Delete `tslint.json` This file is no longer used, and can lead to confusion. ##### Create a `.eslintrc.json` Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named `.eslintrc.json`, and paste the following: ```js { "extends": "./node_modules/gts" } ``` ##### Create a `.eslintignore` The `.eslintignore` file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's _really_ important to ignore your build directory! Here is an example of a `.eslintignore` file: **/node_modules build/ ##### Rule changes The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out [.eslintrc.json](https://togithub.com/google/gts/blob/master/.eslintrc.json). ##### Require Node.js 10.x and up Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up. ##### Features - add the eol-last rule ([#​425](https://www.github.com/google/gts/issues/425)) ([50ebd4d](https://www.github.com/google/gts/commit/50ebd4dbaf063615f4c025f567ca28076a734223)) - allow eslintrc to run over tsx files ([#​469](https://www.github.com/google/gts/issues/469)) ([a21db94](https://www.github.com/google/gts/commit/a21db94601def563952d677cb0980a12b6730f4c)) - disable global rule for checking TODO comments ([#​459](https://www.github.com/google/gts/issues/459)) ([96aa84a](https://www.github.com/google/gts/commit/96aa84a0a42181046daa248750cc8fef0c320619)) - override require-atomic-updates ([#​468](https://www.github.com/google/gts/issues/468)) ([8105c93](https://www.github.com/google/gts/commit/8105c9334ee5104b05f6b1b2f150e51419637262)) - prefer single quotes if possible ([#​475](https://www.github.com/google/gts/issues/475)) ([39a2705](https://www.github.com/google/gts/commit/39a2705e51b4b6329a70f91f8293a2d7a363bf5d)) - use eslint instead of tslint ([#​400](https://www.github.com/google/gts/issues/400)) ([b3096fb](https://www.github.com/google/gts/commit/b3096fbd5076d302d93c2307bf627e12c423e726)) ##### Bug Fixes - use .prettierrc.js ([#​437](https://www.github.com/google/gts/issues/437)) ([06efa84](https://www.github.com/google/gts/commit/06efa8444cdf1064b64f3e8d61ebd04f45d90b4c)) - **deps:** update dependency chalk to v4 ([#​477](https://www.github.com/google/gts/issues/477)) ([061d64e](https://www.github.com/google/gts/commit/061d64e29d37b93ce55228937cc100e05ddef352)) - **deps:** update dependency eslint-plugin-node to v11 ([#​426](https://www.github.com/google/gts/issues/426)) ([a394b7c](https://www.github.com/google/gts/commit/a394b7c1f80437f25017ca5c500b968ebb789ece)) - **deps:** update dependency execa to v4 ([#​427](https://www.github.com/google/gts/issues/427)) ([f42ef36](https://www.github.com/google/gts/commit/f42ef36709251553342e655e287e889df72ee3e3)) - **deps:** update dependency prettier to v2 ([#​464](https://www.github.com/google/gts/issues/464)) ([20ef43d](https://www.github.com/google/gts/commit/20ef43d566df17d3c93949ef7db3b72ee9123ca3)) - disable no-use-before-define ([#​431](https://www.github.com/google/gts/issues/431)) ([dea2c22](https://www.github.com/google/gts/commit/dea2c223d1d3a60a1786aa820eebb93be27016a7)) - **deps:** update dependency update-notifier to v4 ([#​403](https://www.github.com/google/gts/issues/403)) ([57393b7](https://www.github.com/google/gts/commit/57393b74c6cf299e8ae09311f0382226b8baa3e3)) - **deps:** upgrade to meow 6.x ([#​423](https://www.github.com/google/gts/issues/423)) ([8f93d00](https://www.github.com/google/gts/commit/8f93d0049337a832d9a22b6ae4e86fd41140ec56)) - align back to the google style guide ([#​440](https://www.github.com/google/gts/issues/440)) ([8bd78c4](https://www.github.com/google/gts/commit/8bd78c4c78526a72400f618a95a987d2a7c1a8db)) - disable empty-function check ([#​467](https://www.github.com/google/gts/issues/467)) ([6455d7a](https://www.github.com/google/gts/commit/6455d7a9d227320d3ffe1b00c9c739b846f339a8)) - drop support for node 8 ([#​422](https://www.github.com/google/gts/issues/422)) ([888c686](https://www.github.com/google/gts/commit/888c68692079065f38ce66ec84472f1f3311a050)) - emit .prettierrc.js with init ([#​462](https://www.github.com/google/gts/issues/462)) ([b114614](https://www.github.com/google/gts/commit/b114614d22ab5560d2d1dd5cb6695968cc80027b)) - enable trailing comma ([#​470](https://www.github.com/google/gts/issues/470)) ([6518f58](https://www.github.com/google/gts/commit/6518f5843d3093e3beb7d3371b56d9aecedf3924)) - include _.tsx and _.jsx in default fix command ([#​473](https://www.github.com/google/gts/issues/473)) ([0509780](https://www.github.com/google/gts/commit/050978005ad089d9b3b5d8895b25ea1175d75db2)) ##### [1.1.2](https://www.github.com/google/gts/compare/v1.1.1...v1.1.2) (2019-11-20) ##### Bug Fixes - **deps:** update to newest prettier (with support for optional chain) ([#​396](https://www.github.com/google/gts/issues/396)) ([ce8ad06](https://www.github.com/google/gts/commit/ce8ad06c8489c44a9e2ed5292382637b3ebb7601)) ##### [1.1.1](https://www.github.com/google/gts/compare/v1.1.0...v1.1.1) (2019-11-11) ##### Bug Fixes - **deps:** update dependency chalk to v3 ([#​389](https://www.github.com/google/gts/issues/389)) ([1ce0f45](https://www.github.com/google/gts/commit/1ce0f450677e143a27efc39def617d13c66503e8)) - **deps:** update dependency inquirer to v7 ([#​377](https://www.github.com/google/gts/issues/377)) ([bf2c349](https://www.github.com/google/gts/commit/bf2c349b2208ac63e551542599ac9cd27b461338)) - **deps:** update dependency rimraf to v3 ([#​374](https://www.github.com/google/gts/issues/374)) ([2058eaa](https://www.github.com/google/gts/commit/2058eaa682f4baae978b469fd708d1f866e7da74)) - **deps:** update dependency write-file-atomic to v3 ([#​353](https://www.github.com/google/gts/issues/353)) ([59e6aa8](https://www.github.com/google/gts/commit/59e6aa8580a2f8e9457d2d2b6fa9e18e86347592))
--- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 084f9312f21..e189188053d 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -37,7 +37,7 @@ "eslint-config-prettier": "^6.9.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.1.2", - "gts": "2.0.0-alpha.9", + "gts": "2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From 257b30f306138968a1771917f23db63aaf7760a0 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 10 Apr 2020 18:48:23 -0700 Subject: [PATCH 041/181] fix: remove eslint, update gax, fix generated protos, run the generator (#68) Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. --- packages/google-monitoring-dashboard/.jsdoc.js | 2 +- .../google-monitoring-dashboard/.prettierrc.js | 2 +- packages/google-monitoring-dashboard/package.json | 14 +++++--------- .../google-monitoring-dashboard/synth.metadata | 13 +++---------- packages/google-monitoring-dashboard/synth.py | 2 +- .../test/gapic_dashboards_service_v1.ts | 14 +++++++------- 6 files changed, 18 insertions(+), 29 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index bdab09eaa14..21817ea3bec 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2019 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/monitoring-dashboards', diff --git a/packages/google-monitoring-dashboard/.prettierrc.js b/packages/google-monitoring-dashboard/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/packages/google-monitoring-dashboard/.prettierrc.js +++ b/packages/google-monitoring-dashboard/.prettierrc.js @@ -4,7 +4,7 @@ // 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, diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index e189188053d..d82d9c21472 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -16,28 +16,24 @@ "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "docs-test": "linkinator docs", - "fix": "gts fix && eslint samples --fix", - "lint": "gts check && eslint samples", + "fix": "gts fix", + "lint": "gts fix", "predocs-test": "npm run docs", "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 && cd ../", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm install" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.9.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.1.2", - "gts": "2.0.0", + "gts": "^2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 6bd6cd781d8..5c3f080ab0b 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2020-04-03T11:56:37.405558Z", + "updateTime": "2020-04-11T00:36:02.116747Z", "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", - "internalRef": "304500143" - } - }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", + "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" } } ], diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index fd25b12d2a8..187aa52c026 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -43,6 +43,6 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npm', 'run', 'lint']) subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 1974ab3d6f0..6fea92d55c4 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -299,7 +299,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createDashboard(request); }, expectedError); assert( @@ -413,7 +413,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getDashboard(request); }, expectedError); assert( @@ -527,7 +527,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteDashboard(request); }, expectedError); assert( @@ -644,7 +644,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateDashboard(request); }, expectedError); assert( @@ -774,7 +774,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listDashboards(request); }, expectedError); assert( @@ -873,7 +873,7 @@ describe('v1.DashboardsServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -952,7 +952,7 @@ describe('v1.DashboardsServiceClient', () => { expectedError ); const iterable = client.listDashboardsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = []; for await (const resource of iterable) { responses.push(resource!); From bf8b8ea69f8649c1a4fc00fc2798000820fd1199 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:15:02 -0700 Subject: [PATCH 042/181] build: remove unused codecov config (#69) --- packages/google-monitoring-dashboard/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/google-monitoring-dashboard/codecov.yaml diff --git a/packages/google-monitoring-dashboard/codecov.yaml b/packages/google-monitoring-dashboard/codecov.yaml deleted file mode 100644 index 5724ea9478d..00000000000 --- a/packages/google-monitoring-dashboard/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From e7970e0206600a0e392410d1a949f70d31eab27a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 12 Apr 2020 13:14:30 -0700 Subject: [PATCH 043/181] chore: update proto namespaces (#70) --- .../monitoring/dashboard/v1/common.proto | 1 + .../monitoring/dashboard/v1/dashboard.proto | 1 + .../dashboard/v1/dashboards_service.proto | 1 + .../monitoring/dashboard/v1/drilldowns.proto | 1 + .../monitoring/dashboard/v1/layouts.proto | 1 + .../monitoring/dashboard/v1/metrics.proto | 1 + .../monitoring/dashboard/v1/scorecard.proto | 1 + .../monitoring/dashboard/v1/service.proto | 1 + .../google/monitoring/dashboard/v1/text.proto | 1 + .../monitoring/dashboard/v1/widget.proto | 1 + .../monitoring/dashboard/v1/xychart.proto | 1 + .../protos/protos.json | 1 + .../synth.metadata | 19 ++++++++++++++++--- 13 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index f1c5b987544..4ab3f5312e7 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -20,6 +20,7 @@ package google.monitoring.dashboard.v1; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index 20ddccfc50e..b973f4e4723 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -20,6 +20,7 @@ package google.monitoring.dashboard.v1; import "google/monitoring/dashboard/v1/layouts.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DashboardsProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index 9b7c0152ab1..83dbc214901 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -25,6 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DashboardsServiceProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index cb9fefe32f7..d551b48d03c 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DrilldownsProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index 23cb8423dc2..278c7705063 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -20,6 +20,7 @@ package google.monitoring.dashboard.v1; import "google/monitoring/dashboard/v1/widget.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "LayoutsProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index 1b051aa16c5..1487c3003d4 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -21,6 +21,7 @@ import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/common.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "MetricsProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index 0af0af40898..dd2633beca1 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -21,6 +21,7 @@ import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "ScorecardProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 74290edd6d5..1d215107726 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 2b2236712c8..537daeacb5e 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "TextProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 4316aa9964f..cb9282af892 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -24,6 +24,7 @@ import "google/monitoring/dashboard/v1/xychart.proto"; import "google/protobuf/empty.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "WidgetProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index 8fe3d660a38..3d768b7bc46 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -22,6 +22,7 @@ import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "XyChartProto"; option java_package = "com.google.monitoring.dashboard.v1"; diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 8068c6bce14..c1108048be9 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -926,6 +926,7 @@ "v1": { "options": { "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", + "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1", "java_multiple_files": true, "java_outer_classname": "ServiceMonitoringProto", "java_package": "com.google.monitoring.dashboard.v1" diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 5c3f080ab0b..b470d805410 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -1,12 +1,25 @@ { - "updateTime": "2020-04-11T00:36:02.116747Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", + "sha": "8c33d5811fbf60adc7c9dd15be4e64e59630e058" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", + "internalRef": "305974465" + } + }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", - "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" } } ], From bb5f9be10646dd72542f4f844152d9ac1aeaffd3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 14:55:06 -0700 Subject: [PATCH 044/181] chore: update lint ignore files (#71) --- packages/google-monitoring-dashboard/.eslintignore | 3 ++- packages/google-monitoring-dashboard/.prettierignore | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/.eslintignore b/packages/google-monitoring-dashboard/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-monitoring-dashboard/.eslintignore +++ b/packages/google-monitoring-dashboard/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-monitoring-dashboard/.prettierignore b/packages/google-monitoring-dashboard/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-monitoring-dashboard/.prettierignore +++ b/packages/google-monitoring-dashboard/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ From 85d18574a7dae9268f06a7fb08cd92454661f8fe Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:29:59 -0700 Subject: [PATCH 045/181] chore: remove tslint.json (#72) --- packages/google-monitoring-dashboard/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/google-monitoring-dashboard/tslint.json diff --git a/packages/google-monitoring-dashboard/tslint.json b/packages/google-monitoring-dashboard/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-monitoring-dashboard/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From eabde31d714a64f2d22476cf7896fe845211dc47 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 09:54:21 -0700 Subject: [PATCH 046/181] chore: remove unused dev packages (#73) --- packages/google-monitoring-dashboard/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index d82d9c21472..2d3f1313a62 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -41,7 +41,6 @@ "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "prettier": "^1.19.1", "sinon": "^9.0.1", "ts-loader": "^6.2.1", "typescript": "^3.8.3", From 150d7960370742ea17ad304f5888f8860781ae8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 17:31:34 +0200 Subject: [PATCH 047/181] chore(deps): update dependency ts-loader to v7 (#74) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^6.2.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/ts-loader/6.2.2/7.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v7.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v700) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v6.2.2...v7.0.0) - [Project reference support enhancements](https://togithub.com/TypeStrong/ts-loader/pull/1076) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - Following the end of life of Node 8, `ts-loader` no longer supports Node 8 **BREAKING CHANGE**
--- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 2d3f1313a62..e96807121b9 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -42,7 +42,7 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^6.2.1", + "ts-loader": "^7.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" From bb83440a0e341edda953426aa32f564c5af4f62a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 18:31:12 +0200 Subject: [PATCH 048/181] chore(deps): update dependency null-loader to v4 (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [null-loader](https://togithub.com/webpack-contrib/null-loader) | devDependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/null-loader/3.0.0/4.0.0) | --- ### Release Notes
webpack-contrib/null-loader ### [`v4.0.0`](https://togithub.com/webpack-contrib/null-loader/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpack-contribnull-loadercomparev300v400-2020-04-15) [Compare Source](https://togithub.com/webpack-contrib/null-loader/compare/v3.0.0...v4.0.0) ##### Bug Fixes - support `webpack@5` ##### ⚠ BREAKING CHANGES - minimum required Nodejs version is `10.13`
--- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index e96807121b9..a429d05a834 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -39,7 +39,7 @@ "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", "mocha": "^7.0.0", - "null-loader": "^3.0.0", + "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", "ts-loader": "^7.0.0", From ae25473c89e1a0e2b5a787ed9cb729987d3a3f24 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 15 Apr 2020 10:31:12 -0700 Subject: [PATCH 049/181] chore: run fix instead of lint in synthfile (#77) --- packages/google-monitoring-dashboard/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index 187aa52c026..fd25b12d2a8 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -43,6 +43,6 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src']) From a23fe74feac27a80c9f72bc4f469d3f29ec08290 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 20:28:24 -0700 Subject: [PATCH 050/181] build: adopt changes to generator formatting (#79) --- .../protos/protos.js | 382 +++++++++--------- .../synth.metadata | 8 +- .../system-test/install.ts | 4 +- 3 files changed, 197 insertions(+), 197 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 48c059e1f1c..992aaed9538 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -113,9 +113,9 @@ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -642,9 +642,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) + 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) @@ -661,9 +661,9 @@ 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 && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("sourceCodeInfo")) + 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) @@ -671,7 +671,7 @@ 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 && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -1209,7 +1209,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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) @@ -1226,7 +1226,7 @@ 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 && message.hasOwnProperty("options")) + 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) @@ -1691,11 +1691,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -1919,9 +1919,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -2412,25 +2412,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -2777,7 +2777,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} + * @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 @@ -2823,7 +2823,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} + * @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 @@ -2904,9 +2904,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -3149,12 +3149,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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) @@ -3457,9 +3457,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -3679,11 +3679,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -3917,12 +3917,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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; }; @@ -4202,17 +4202,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -4641,45 +4641,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + 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) @@ -5072,7 +5072,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} + * @enum {number} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -5181,13 +5181,13 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + 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) @@ -5507,17 +5507,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) + 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) @@ -5846,7 +5846,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -5862,7 +5862,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {string} + * @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 @@ -6161,9 +6161,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -6406,7 +6406,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -6655,14 +6655,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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 && message.hasOwnProperty(".google.api.defaultHost")) + 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 && message.hasOwnProperty(".google.api.oauthScopes")) + 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; }; @@ -6941,9 +6941,9 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + 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) @@ -6951,7 +6951,7 @@ 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 && message.hasOwnProperty(".google.api.http")) + 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; }; @@ -7185,7 +7185,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} + * @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 @@ -7315,17 +7315,17 @@ 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 && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -8102,9 +8102,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + 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) @@ -8635,11 +8635,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -9304,11 +9304,11 @@ Aggregation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); if (message.groupByFields != null && message.groupByFields.length) for (var i = 0; i < message.groupByFields.length; ++i) @@ -9667,7 +9667,7 @@ /** * Aligner enum. * @name google.monitoring.dashboard.v1.Aggregation.Aligner - * @enum {string} + * @enum {number} * @property {number} ALIGN_NONE=0 ALIGN_NONE value * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value * @property {number} ALIGN_RATE=2 ALIGN_RATE value @@ -9715,7 +9715,7 @@ /** * Reducer enum. * @name google.monitoring.dashboard.v1.Aggregation.Reducer - * @enum {string} + * @enum {number} * @property {number} REDUCE_NONE=0 REDUCE_NONE value * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value * @property {number} REDUCE_MIN=2 REDUCE_MIN value @@ -9827,11 +9827,11 @@ PickTimeSeriesFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); - if (message.direction != null && message.hasOwnProperty("direction")) + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); return writer; }; @@ -10036,7 +10036,7 @@ /** * Method enum. * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method - * @enum {string} + * @enum {number} * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value * @property {number} METHOD_MEAN=1 METHOD_MEAN value * @property {number} METHOD_MAX=2 METHOD_MAX value @@ -10058,7 +10058,7 @@ /** * Direction enum. * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction - * @enum {string} + * @enum {number} * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value * @property {number} TOP=1 TOP value * @property {number} BOTTOM=2 BOTTOM value @@ -10139,9 +10139,9 @@ StatisticalTimeSeriesFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); return writer; }; @@ -10297,7 +10297,7 @@ /** * Method enum. * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method - * @enum {string} + * @enum {number} * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value */ @@ -10426,17 +10426,17 @@ Dashboard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) + if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) + if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) + if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -10724,7 +10724,7 @@ GridLayout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && message.hasOwnProperty("columns")) + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); if (message.widgets != null && message.widgets.length) for (var i = 0; i < message.widgets.length; ++i) @@ -11174,7 +11174,7 @@ Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weight != null && message.hasOwnProperty("weight")) + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); if (message.widgets != null && message.widgets.length) for (var i = 0; i < message.widgets.length; ++i) @@ -11627,7 +11627,7 @@ Column.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weight != null && message.hasOwnProperty("weight")) + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); if (message.widgets != null && message.widgets.length) for (var i = 0; i < message.widgets.length; ++i) @@ -11915,15 +11915,15 @@ Widget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && Object.hasOwnProperty.call(message, "title")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.xyChart != null && message.hasOwnProperty("xyChart")) + if (message.xyChart != null && Object.hasOwnProperty.call(message, "xyChart")) $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.scorecard != null && message.hasOwnProperty("scorecard")) + if (message.scorecard != null && Object.hasOwnProperty.call(message, "scorecard")) $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && Object.hasOwnProperty.call(message, "text")) $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.blank != null && message.hasOwnProperty("blank")) + if (message.blank != null && Object.hasOwnProperty.call(message, "blank")) $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -12243,11 +12243,11 @@ Scorecard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) + if (message.gaugeView != null && Object.hasOwnProperty.call(message, "gaugeView")) $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) + if (message.sparkChartView != null && Object.hasOwnProperty.call(message, "sparkChartView")) $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.thresholds != null && message.thresholds.length) for (var i = 0; i < message.thresholds.length; ++i) @@ -12524,9 +12524,9 @@ GaugeView.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); - if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); return writer; }; @@ -12734,9 +12734,9 @@ SparkChartView.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + if (message.sparkChartType != null && Object.hasOwnProperty.call(message, "sparkChartType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -12993,11 +12993,11 @@ TimeSeriesQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) + if (message.timeSeriesFilter != null && Object.hasOwnProperty.call(message, "timeSeriesFilter")) $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) + if (message.timeSeriesFilterRatio != null && Object.hasOwnProperty.call(message, "timeSeriesFilterRatio")) $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + if (message.unitOverride != null && Object.hasOwnProperty.call(message, "unitOverride")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); return writer; }; @@ -13270,13 +13270,13 @@ TimeSeriesFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -13575,15 +13575,15 @@ TimeSeriesFilterRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numerator != null && message.hasOwnProperty("numerator")) + if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denominator != null && message.hasOwnProperty("denominator")) + if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -13859,9 +13859,9 @@ RatioPart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -14095,13 +14095,13 @@ Threshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - if (message.color != null && message.hasOwnProperty("color")) + if (message.color != null && Object.hasOwnProperty.call(message, "color")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); - if (message.direction != null && message.hasOwnProperty("direction")) + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); return writer; }; @@ -14302,7 +14302,7 @@ /** * Color enum. * @name google.monitoring.dashboard.v1.Threshold.Color - * @enum {string} + * @enum {number} * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value * @property {number} YELLOW=4 YELLOW value * @property {number} RED=6 RED value @@ -14318,7 +14318,7 @@ /** * Direction enum. * @name google.monitoring.dashboard.v1.Threshold.Direction - * @enum {string} + * @enum {number} * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value * @property {number} ABOVE=1 ABOVE value * @property {number} BELOW=2 BELOW value @@ -14337,7 +14337,7 @@ /** * SparkChartType enum. * @name google.monitoring.dashboard.v1.SparkChartType - * @enum {string} + * @enum {number} * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value * @property {number} SPARK_LINE=1 SPARK_LINE value * @property {number} SPARK_BAR=2 SPARK_BAR value @@ -14415,9 +14415,9 @@ Text.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && message.hasOwnProperty("format")) + if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); return writer; }; @@ -14578,7 +14578,7 @@ /** * Format enum. * @name google.monitoring.dashboard.v1.Text.Format - * @enum {string} + * @enum {number} * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value * @property {number} MARKDOWN=1 MARKDOWN value * @property {number} RAW=2 RAW value @@ -14700,16 +14700,16 @@ if (message.dataSets != null && message.dataSets.length) for (var i = 0; i < message.dataSets.length; ++i) $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + if (message.timeshiftDuration != null && Object.hasOwnProperty.call(message, "timeshiftDuration")) $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.thresholds != null && message.thresholds.length) for (var i = 0; i < message.thresholds.length; ++i) $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.xAxis != null && message.hasOwnProperty("xAxis")) + if (message.xAxis != null && Object.hasOwnProperty.call(message, "xAxis")) $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yAxis != null && message.hasOwnProperty("yAxis")) + if (message.yAxis != null && Object.hasOwnProperty.call(message, "yAxis")) $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -15036,13 +15036,13 @@ DataSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.plotType != null && message.hasOwnProperty("plotType")) + if (message.plotType != null && Object.hasOwnProperty.call(message, "plotType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + if (message.legendTemplate != null && Object.hasOwnProperty.call(message, "legendTemplate")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -15245,7 +15245,7 @@ /** * PlotType enum. * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - * @enum {string} + * @enum {number} * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value * @property {number} LINE=1 LINE value * @property {number} STACKED_AREA=2 STACKED_AREA value @@ -15330,9 +15330,9 @@ Axis.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.scale != null && message.hasOwnProperty("scale")) + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); return writer; }; @@ -15493,7 +15493,7 @@ /** * Scale enum. * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale - * @enum {string} + * @enum {number} * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value * @property {number} LINEAR=1 LINEAR value * @property {number} LOG10=2 LOG10 value @@ -15568,7 +15568,7 @@ ChartOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && message.hasOwnProperty("mode")) + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; @@ -15722,7 +15722,7 @@ /** * Mode enum. * @name google.monitoring.dashboard.v1.ChartOptions.Mode - * @enum {string} + * @enum {number} * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value * @property {number} COLOR=1 COLOR value * @property {number} X_RAY=2 X_RAY value @@ -16005,9 +16005,9 @@ CreateDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.dashboard != null && message.hasOwnProperty("dashboard")) + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -16229,11 +16229,11 @@ ListDashboardsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -16456,7 +16456,7 @@ if (message.dashboards != null && message.dashboards.length) for (var i = 0; i < message.dashboards.length; ++i) $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -16674,7 +16674,7 @@ GetDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -16861,7 +16861,7 @@ DeleteDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -17048,7 +17048,7 @@ UpdateDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dashboard != null && message.hasOwnProperty("dashboard")) + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -17205,7 +17205,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {string} + * @enum {number} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -17293,7 +17293,7 @@ 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 && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -17607,26 +17607,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) + if (message.get != null && Object.hasOwnProperty.call(message, "get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) + if (message.put != null && Object.hasOwnProperty.call(message, "put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) + if (message.post != null && Object.hasOwnProperty.call(message, "post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) + 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 && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -17983,9 +17983,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index b470d805410..2c32d3bfda5 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "8c33d5811fbf60adc7c9dd15be4e64e59630e058" + "sha": "acb85cfec9a2c5dff03a425e87723a9ef09a9db3" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", - "internalRef": "305974465" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" } } ], diff --git a/packages/google-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts index c4d80e9c0c8..4c1ba3eb79a 100644 --- a/packages/google-monitoring-dashboard/system-test/install.ts +++ b/packages/google-monitoring-dashboard/system-test/install.ts @@ -21,7 +21,7 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. @@ -35,7 +35,7 @@ describe('typescript consumer tests', () => { await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. From d15d31495565afd00e0d60dbe924e26a347bf27f Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 23 Apr 2020 19:30:42 -0700 Subject: [PATCH 051/181] chore: update npm scripts and synth.py (#80) Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool. --- packages/google-monitoring-dashboard/package.json | 5 +++-- packages/google-monitoring-dashboard/synth.py | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index a429d05a834..b0c6bbc909f 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -17,13 +17,14 @@ "docs": "jsdoc -c .jsdoc.js", "docs-test": "linkinator docs", "fix": "gts fix", - "lint": "gts fix", + "lint": "gts check", "predocs-test": "npm run docs", "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 && cd ../", - "prelint": "cd samples; npm link ../; npm install" + "prelint": "cd samples; npm link ../; npm install", + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.1.0" diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index fd25b12d2a8..c33385c3fa4 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -15,7 +15,7 @@ import synthtool as s import synthtool.gcp as gcp -import subprocess +import synthtool.languages.node as node import logging logging.basicConfig(level=logging.DEBUG) @@ -41,8 +41,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates, excludes=['.github/release-please.yml']) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npx', 'compileProtos', 'src']) - +node.postprocess_gapic_library() From 4a3968063606b6ac612fcbd1f20efea828d7cf12 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 19:36:20 -0700 Subject: [PATCH 052/181] fix: regen protos and tests, formatting (#81) --- .../synth.metadata | 14 +++-------- .../test/gapic_dashboards_service_v1.ts | 24 +++++-------------- 2 files changed, 9 insertions(+), 29 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 2c32d3bfda5..ce042178ffe 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "acb85cfec9a2c5dff03a425e87723a9ef09a9db3" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", + "sha": "21a5fc3779c513316cbc648f7aebfbfed41f2022" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 6fea92d55c4..541b08910e4 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -299,9 +299,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createDashboard(request); - }, expectedError); + await assert.rejects(client.createDashboard(request), expectedError); assert( (client.innerApiCalls.createDashboard as SinonStub) .getCall(0) @@ -413,9 +411,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getDashboard(request); - }, expectedError); + await assert.rejects(client.getDashboard(request), expectedError); assert( (client.innerApiCalls.getDashboard as SinonStub) .getCall(0) @@ -527,9 +523,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteDashboard(request); - }, expectedError); + await assert.rejects(client.deleteDashboard(request), expectedError); assert( (client.innerApiCalls.deleteDashboard as SinonStub) .getCall(0) @@ -644,9 +638,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateDashboard(request); - }, expectedError); + await assert.rejects(client.updateDashboard(request), expectedError); assert( (client.innerApiCalls.updateDashboard as SinonStub) .getCall(0) @@ -774,9 +766,7 @@ describe('v1.DashboardsServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listDashboards(request); - }, expectedError); + await assert.rejects(client.listDashboards(request), expectedError); assert( (client.innerApiCalls.listDashboards as SinonStub) .getCall(0) @@ -873,9 +863,7 @@ describe('v1.DashboardsServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listDashboards.createStream as SinonStub) .getCall(0) From 854f5a410e8759676a1763bf0018f6767053cd6e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:27:44 -0700 Subject: [PATCH 053/181] build: do not fail builds on codecov errors (#528) (#82) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2f68300a-9812-4342-86c6-33ab267ece4f/targets Source-Link: https://github.com/googleapis/synthtool/commit/be74d3e532faa47eb59f1a0eaebde0860d1d8ab4 --- .../google-monitoring-dashboard/synth.metadata | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index ce042178ffe..3c306cfbcbf 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", - "sha": "21a5fc3779c513316cbc648f7aebfbfed41f2022" + "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", + "sha": "61314fe1099dfeab00d1392ffe1757880d398497" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "83816bb3093686a28af2891db5b7506614a820b1", + "internalRef": "310509915" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From 8195e4e816ba4a2b2896bd450cb67b79fd996867 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2020 14:54:30 -0700 Subject: [PATCH 054/181] chore: release 2.0.0 (#59) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../google-monitoring-dashboard/CHANGELOG.md | 18 ++++++++++++++++++ .../google-monitoring-dashboard/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 7f580495cef..31b496e1da1 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [2.0.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.3.0...v2.0.0) (2020-05-08) + + +### ⚠ BREAKING CHANGES + +* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. + +### Features + +* drop node8 support, support for async iterators ([#58](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/58)) ([0891dab](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/0891dab8f977cdb8825e12b3faf8d45caeea4ba4)) + + +### Bug Fixes + +* export explicit version from protos.js ([#63](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/63)) ([a1ef68f](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/a1ef68f0f3f6366d41ac4de23e31cca67d232c50)) +* regen protos and tests, formatting ([#81](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/81)) ([61314fe](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/61314fe1099dfeab00d1392ffe1757880d398497)) +* remove eslint, update gax, fix generated protos, run the generator ([#68](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/68)) ([8c33d58](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/8c33d5811fbf60adc7c9dd15be4e64e59630e058)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.2.0...v1.3.0) (2020-03-06) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b0c6bbc909f..c4d43648750 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "1.3.0", + "version": "2.0.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index df1273983f4..a7fae6bbbab 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^1.3.0" + "@google-cloud/monitoring-dashboards": "^2.0.0" }, "devDependencies": { "c8": "^7.0.0", From 9fd44118c755b443680d55df8362fec82ad795c1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Jun 2020 17:38:32 -0700 Subject: [PATCH 055/181] build: update protos.js (#83) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/041f5df7-f5d3-4b2a-9ede-0752bf41c185/targets --- .../protos/protos.d.ts | 6 ++++ .../protos/protos.js | 28 +++++++++++++++++-- .../protos/protos.json | 6 +++- .../synth.metadata | 2 +- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index f03968dbb16..15b38e21cb0 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -829,6 +829,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -870,6 +873,9 @@ export namespace google { /** 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 diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 992aaed9538..3e3fafdaa00 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_monitoring_dashboards_1_3_0_protos || ($protobuf.roots._google_cloud_monitoring_dashboards_1_3_0_protos = {}); + var $root = $protobuf.roots._google_cloud_monitoring_dashboards_2_0_0_protos || ($protobuf.roots._google_cloud_monitoring_dashboards_2_0_0_protos = {}); $root.google = (function() { @@ -2291,6 +2291,7 @@ * @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 */ /** @@ -2388,6 +2389,14 @@ */ 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 @@ -2432,6 +2441,8 @@ 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; }; @@ -2496,6 +2507,9 @@ 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; @@ -2590,6 +2604,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -2712,6 +2729,8 @@ 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; }; @@ -2739,6 +2758,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -2760,6 +2780,8 @@ 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; }; @@ -4551,7 +4573,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -5000,7 +5022,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index c1108048be9..48b9231dd9d 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -237,6 +237,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -472,7 +476,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 3c306cfbcbf..fab3793488f 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "61314fe1099dfeab00d1392ffe1757880d398497" + "sha": "9c595ca4d68dd0ea1318929fafa90694f9bac02c" } }, { From bd59d0fe7bdb1f5310681dd0cd97d2cad61251f8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:40:10 -0700 Subject: [PATCH 056/181] feat: move ts target to es2018 from es2016 (#87) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b55eba7-85ee-48d5-a737-8b677439db4d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1c92077459db3dc50741e878f98b08c6261181e0 --- packages/google-monitoring-dashboard/protos/protos.js | 2 +- .../src/v1/dashboards_service_client.ts | 7 +++++++ packages/google-monitoring-dashboard/synth.metadata | 4 ++-- packages/google-monitoring-dashboard/tsconfig.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 3e3fafdaa00..024feb2f9c0 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_monitoring_dashboards_2_0_0_protos || ($protobuf.roots._google_cloud_monitoring_dashboards_2_0_0_protos = {}); + var $root = $protobuf.roots._google_cloud_monitoring_dashboards_protos || ($protobuf.roots._google_cloud_monitoring_dashboards_protos = {}); $root.google = (function() { diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 1c32c3dd02d..0df8db1bce7 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -99,6 +99,13 @@ export class DashboardsServiceClient { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index fab3793488f..16085a2dc14 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "9c595ca4d68dd0ea1318929fafa90694f9bac02c" + "sha": "ebadd7ca65cfd22520c4a54596f47e4badf486af" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-monitoring-dashboard/tsconfig.json b/packages/google-monitoring-dashboard/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/packages/google-monitoring-dashboard/tsconfig.json +++ b/packages/google-monitoring-dashboard/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From 824b07f85a3957e0b3456ce941bb3df41ecdef6b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 17:51:35 +0200 Subject: [PATCH 057/181] chore(deps): update dependency mocha to v8 (#89) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | --- ### Release Notes
mochajs/mocha ### [`v8.0.1`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​801--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.0.0...v8.0.1) The obligatory patch after a major. #### :bug: Fixes - [#​4328](https://togithub.com/mochajs/mocha/issues/4328): Fix `--parallel` when combined with `--watch` ([**@​boneskull**](https://togithub.com/boneskull)) ### [`v8.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​800--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v7.2.0...v8.0.0) In this major release, Mocha adds the ability to _run tests in parallel_. Better late than never! Please note the **breaking changes** detailed below. Let's welcome [**@​giltayar**](https://togithub.com/giltayar) and [**@​nicojs**](https://togithub.com/nicojs) to the maintenance team! #### :boom: Breaking Changes - [#​4164](https://togithub.com/mochajs/mocha/issues/4164): **Mocha v8.0.0 now requires Node.js v10.0.0 or newer.** Mocha no longer supports the Node.js v8.x line ("Carbon"), which entered End-of-Life at the end of 2019 ([**@​UlisesGascon**](https://togithub.com/UlisesGascon)) - [#​4175](https://togithub.com/mochajs/mocha/issues/4175): Having been deprecated with a warning since v7.0.0, **`mocha.opts` is no longer supported** ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND:** Replace `mocha.opts` with a [configuration file](https://mochajs.org/#configuring-mocha-nodejs). - [#​4260](https://togithub.com/mochajs/mocha/issues/4260): Remove `enableTimeout()` (`this.enableTimeout()`) from the context object ([**@​craigtaub**](https://togithub.com/craigtaub)) :sparkles: **WORKAROUND:** Replace usage of `this.enableTimeout(false)` in your tests with `this.timeout(0)`. - [#​4315](https://togithub.com/mochajs/mocha/issues/4315): The `spec` option no longer supports a comma-delimited list of files ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND**: Use an array instead (e.g., `"spec": "foo.js,bar.js"` becomes `"spec": ["foo.js", "bar.js"]`). - [#​4309](https://togithub.com/mochajs/mocha/issues/4309): Drop support for Node.js v13.x line, which is now End-of-Life ([**@​juergba**](https://togithub.com/juergba)) - [#​4282](https://togithub.com/mochajs/mocha/issues/4282): `--forbid-only` will throw an error even if exclusive tests are avoided via `--grep` or other means ([**@​arvidOtt**](https://togithub.com/arvidOtt)) - [#​4223](https://togithub.com/mochajs/mocha/issues/4223): The context object's `skip()` (`this.skip()`) in a "before all" (`before()`) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites ([**@​juergba**](https://togithub.com/juergba)) - [#​4178](https://togithub.com/mochajs/mocha/issues/4178): Remove previously soft-deprecated APIs ([**@​wnghdcjfe**](https://togithub.com/wnghdcjfe)): - `Mocha.prototype.ignoreLeaks()` - `Mocha.prototype.useColors()` - `Mocha.prototype.useInlineDiffs()` - `Mocha.prototype.hideDiff()` #### :tada: Enhancements - [#​4245](https://togithub.com/mochajs/mocha/issues/4245): Add ability to run tests in parallel for Node.js (see [docs](https://mochajs.org/#parallel-tests)) ([**@​boneskull**](https://togithub.com/boneskull)) :exclamation: See also [#​4244](https://togithub.com/mochajs/mocha/issues/4244); [Root Hook Plugins (docs)](https://mochajs.org/#root-hook-plugins) -- _root hooks must be defined via Root Hook Plugins to work in parallel mode_ - [#​4304](https://togithub.com/mochajs/mocha/issues/4304): `--require` now works with ES modules ([**@​JacobLey**](https://togithub.com/JacobLey)) - [#​4299](https://togithub.com/mochajs/mocha/issues/4299): In some circumstances, Mocha can run ES modules under Node.js v10 -- _use at your own risk!_ ([**@​giltayar**](https://togithub.com/giltayar)) #### :book: Documentation - [#​4246](https://togithub.com/mochajs/mocha/issues/4246): Add documentation for parallel mode and Root Hook plugins ([**@​boneskull**](https://togithub.com/boneskull)) #### :bug: Fixes (All bug fixes in Mocha v8.0.0 are also breaking changes, and are listed above)
--- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index c4d43648750..2bcb7297bdf 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -39,7 +39,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.0", + "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index a7fae6bbbab..8e3d87e94b6 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.0.0", "chai": "^4.2.0", - "mocha": "^7.0.0" + "mocha": "^8.0.0" } } From 249226de304f2af9a3265fa259c5b8e99e019db8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 13:57:00 -0700 Subject: [PATCH 058/181] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#90) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e306327b-605f-4c07-9420-c106e40c47d5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/e7034945fbdc0e79d3c57f6e299e5c90b0f11469 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 16085a2dc14..0396af286c9 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "ebadd7ca65cfd22520c4a54596f47e4badf486af" + "sha": "846ff12d5a3858cd4c91cb4fcf835b40d5f9b03e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From c03bee9e84d26e1d0ab6a7ade1593bb5e91f8480 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Jun 2020 11:21:49 -0700 Subject: [PATCH 059/181] fix: proper fallback option handling autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .../src/v1/dashboards_service_client.ts | 13 +++++-------- packages/google-monitoring-dashboard/synth.metadata | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 0df8db1bce7..30f1d1d4ea7 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -108,14 +108,11 @@ export class DashboardsServiceClient { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the DashboardsServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 0396af286c9..493abbca05d 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "846ff12d5a3858cd4c91cb4fcf835b40d5f9b03e" + "sha": "80dcc9c7a603e9612bae5536f6e1f0f71de8b702" } }, { From 91684fa4f93e3d5e5944de8b8542c740c19a40e9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 19 Jun 2020 17:20:03 -0700 Subject: [PATCH 060/181] feat: Add support for secondary_aggregation and Monitoring Query Language (#92) * docs: change relative URLs to absolute URLs to fix broken links. PiperOrigin-RevId: 314788297 Source-Author: Google APIs Source-Date: Thu Jun 4 13:05:11 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 51362f378a286494980ffc9a5199ab6e3cefd6d5 Source-Link: https://github.com/googleapis/googleapis/commit/51362f378a286494980ffc9a5199ab6e3cefd6d5 * Add support for secondary_aggregation and Monitoring Query Language. PiperOrigin-RevId: 315496921 Source-Author: Google APIs Source-Date: Tue Jun 9 09:18:04 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 3c5166c1db0f1804af7acdbbd79137630a00ce63 Source-Link: https://github.com/googleapis/googleapis/commit/3c5166c1db0f1804af7acdbbd79137630a00ce63 --- .../monitoring/dashboard/v1/common.proto | 481 +- .../monitoring/dashboard/v1/dashboard.proto | 20 +- .../dashboard/v1/dashboards_service.proto | 56 +- .../monitoring/dashboard/v1/drilldowns.proto | 7 +- .../monitoring/dashboard/v1/layouts.proto | 5 +- .../monitoring/dashboard/v1/metrics.proto | 30 +- .../monitoring/dashboard/v1/scorecard.proto | 14 +- .../monitoring/dashboard/v1/service.proto | 5 +- .../google/monitoring/dashboard/v1/text.proto | 5 +- .../monitoring/dashboard/v1/widget.proto | 5 +- .../monitoring/dashboard/v1/xychart.proto | 15 +- .../protos/protos.d.ts | 1186 +- .../protos/protos.js | 26767 +++++++++------- .../protos/protos.json | 291 +- .../src/v1/dashboards_service_client.ts | 88 +- .../synth.metadata | 6 +- .../test/gapic_dashboards_service_v1.ts | 51 + 17 files changed, 16816 insertions(+), 12216 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 4ab3f5312e7..6dedcf09eac 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,328 +11,376 @@ // WITHOUT 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.monitoring.dashboard.v1; +import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; -// Describes how to combine multiple time series to provide different views of -// the data. Aggregation consists of an alignment step on individual time -// series (`alignment_period` and `per_series_aligner`) followed by an optional -// reduction step of the data across the aligned time series -// (`cross_series_reducer` and `group_by_fields`). For more details, see -// [Aggregation](/monitoring/api/learn_more#aggregation). +// Describes how to combine multiple time series to provide a different view of +// the data. Aggregation of time series is done in two steps. First, each time +// series in the set is _aligned_ to the same time interval boundaries, then the +// set of time series is optionally _reduced_ in number. +// +// Alignment consists of applying the `per_series_aligner` operation +// to each time series after its data has been divided into regular +// `alignment_period` time intervals. This process takes _all_ of the data +// points in an alignment period, applies a mathematical transformation such as +// averaging, minimum, maximum, delta, etc., and converts them into a single +// data point per period. +// +// Reduction is when the aligned and transformed time series can optionally be +// combined, reducing the number of time series through similar mathematical +// transformations. Reduction involves applying a `cross_series_reducer` to +// all the time series, optionally sorting the time series into subsets with +// `group_by_fields`, and applying the reducer to each subset. +// +// The raw time series data can contain a huge amount of information from +// multiple sources. Alignment and reduction transforms this mass of data into +// a more manageable and representative collection of data, for example "the +// 95% latency across the average of all tasks in a cluster". This +// representative data can be more easily graphed and comprehended, and the +// individual time series data is still available for later drilldown. For more +// details, see [Filtering and +// aggregation](https://cloud.google.com/monitoring/api/v3/aggregation). message Aggregation { - // The Aligner describes how to bring the data points in a single - // time series into temporal alignment. + // The `Aligner` specifies the operation that will be applied to the data + // points in each alignment period in a time series. Except for + // `ALIGN_NONE`, which specifies that no operation be applied, each alignment + // operation replaces the set of data values in each alignment period with + // a single value: the result of applying the operation to the data values. + // An aligned time series has a single data value at the end of each + // `alignment_period`. + // + // An alignment operation can change the data type of the values, too. For + // example, if you apply a counting operation to boolean values, the data + // `value_type` in the original time series is `BOOLEAN`, but the `value_type` + // in the aligned result is `INT64`. enum Aligner { - // No alignment. Raw data is returned. Not valid if cross-time - // series reduction is requested. The value type of the result is - // the same as the value type of the input. + // No alignment. Raw data is returned. Not valid if cross-series reduction + // is requested. The `value_type` of the result is the same as the + // `value_type` of the input. ALIGN_NONE = 0; - // Align and convert to delta metric type. This alignment is valid - // for cumulative metrics and delta metrics. Aligning an existing - // delta metric to a delta metric requires that the alignment - // period be increased. The value type of the result is the same - // as the value type of the input. + // Align and convert to + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. + // The output is `delta = y1 - y0`. // - // One can think of this aligner as a rate but without time units; that - // is, the output is conceptually (second_point - first_point). + // This alignment is valid for + // [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and + // `DELTA` metrics. If the selected alignment period results in periods + // with no data, then the aligned value for such a period is created by + // interpolation. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_DELTA = 1; - // Align and convert to a rate. This alignment is valid for - // cumulative metrics and delta metrics with numeric values. The output is a - // gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align and convert to a rate. The result is computed as + // `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + // Think of this aligner as providing the slope of the line that passes + // through the value at the start and at the end of the `alignment_period`. // - // One can think of this aligner as conceptually providing the slope of - // the line that passes through the value at the start and end of the - // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), - // and the output unit is one that has a "/time" dimension. + // This aligner is valid for `CUMULATIVE` + // and `DELTA` metrics with numeric values. If the selected alignment + // period results in periods with no data, then the aligned value for + // such a period is created by interpolation. The output is a `GAUGE` + // metric with `value_type` `DOUBLE`. // - // If, by rate, you are looking for percentage change, see the - // `ALIGN_PERCENT_CHANGE` aligner option. + // If, by "rate", you mean "percentage change", see the + // `ALIGN_PERCENT_CHANGE` aligner instead. ALIGN_RATE = 2; - // Align by interpolating between adjacent points around the - // period boundary. This alignment is valid for gauge - // metrics with numeric values. The value type of the result is the same - // as the value type of the input. + // Align by interpolating between adjacent points around the alignment + // period boundary. This aligner is valid for `GAUGE` metrics with + // numeric values. The `value_type` of the aligned result is the same as the + // `value_type` of the input. ALIGN_INTERPOLATE = 3; - // Align by shifting the oldest data point before the period - // boundary to the boundary. This alignment is valid for gauge - // metrics. The value type of the result is the same as the - // value type of the input. + // Align by moving the most recent data point before the end of the + // alignment period to the boundary at the end of the alignment + // period. This aligner is valid for `GAUGE` metrics. The `value_type` of + // the aligned result is the same as the `value_type` of the input. ALIGN_NEXT_OLDER = 4; - // Align time series via aggregation. The resulting data point in - // the alignment period is the minimum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the minimum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MIN = 10; - // Align time series via aggregation. The resulting data point in - // the alignment period is the maximum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the maximum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MAX = 11; - // Align time series via aggregation. The resulting data point in - // the alignment period is the average or arithmetic mean of all - // data points in the period. This alignment is valid for gauge and delta - // metrics with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the mean value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is `DOUBLE`. ALIGN_MEAN = 12; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // or Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of values in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric or Boolean values. The `value_type` of the aligned result is + // `INT64`. ALIGN_COUNT = 13; - // Align time series via aggregation. The resulting data point in - // the alignment period is the sum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // and distribution values. The value type of the output is the - // same as the value type of the input. + // Align the time series by returning the sum of the values in each + // alignment period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with numeric and distribution values. The `value_type` of the + // aligned result is the same as the `value_type` of the input. ALIGN_SUM = 14; - // Align time series via aggregation. The resulting data point in - // the alignment period is the standard deviation of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the standard deviation of the values + // in each alignment period. This aligner is valid for `GAUGE` and + // `DELTA` metrics with numeric values. The `value_type` of the output is + // `DOUBLE`. ALIGN_STDDEV = 15; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of True-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `True` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_TRUE = 16; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of False-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `False` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_FALSE = 24; - // Align time series via aggregation. The resulting data point in - // the alignment period is the fraction of True-valued data points in the - // period. This alignment is valid for gauge metrics with Boolean values. - // The output value is in the range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the ratio of the number of `True` + // values to the total number of values in each alignment period. This + // aligner is valid for `GAUGE` metrics with Boolean values. The output + // value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. ALIGN_FRACTION_TRUE = 17; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 99th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 99th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_99 = 18; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 95th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 95th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_95 = 19; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 50th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 50th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_50 = 20; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 5th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 5th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_05 = 21; - // Align and convert to a percentage change. This alignment is valid for - // gauge and delta metrics with numeric values. This alignment conceptually - // computes the equivalent of "((current - previous)/previous)*100" - // where previous value is determined based on the alignmentPeriod. - // In the event that previous is 0 the calculated value is infinity with the - // exception that if both (current - previous) and previous are 0 the - // calculated value is 0. - // A 10 minute moving mean is computed at each point of the time window + // Align and convert to a percentage change. This aligner is valid for + // `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + // `((current - previous)/previous) * 100`, where the value of `previous` is + // determined based on the `alignment_period`. + // + // If the values of `current` and `previous` are both 0, then the returned + // value is 0. If only `previous` is 0, the returned value is infinity. + // + // A 10-minute moving mean is computed at each point of the alignment period // prior to the above calculation to smooth the metric and prevent false - // positives from very short lived spikes. - // Only applicable for data that is >= 0. Any values < 0 are treated as - // no data. While delta metrics are accepted by this alignment special care - // should be taken that the values for the metric will always be positive. - // The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // positives from very short-lived spikes. The moving mean is only + // applicable for data whose values are `>= 0`. Any values `< 0` are + // treated as a missing datapoint, and are ignored. While `DELTA` + // metrics are accepted by this alignment, special care should be taken that + // the values for the metric will always be positive. The output is a + // `GAUGE` metric with `value_type` `DOUBLE`. ALIGN_PERCENT_CHANGE = 23; } - // A Reducer describes how to aggregate data points from multiple - // time series into a single time series. + // A Reducer operation describes how to aggregate data points from multiple + // time series into a single time series, where the value of each data point + // in the resulting series is a function of all the already aligned values in + // the input time series. enum Reducer { - // No cross-time series reduction. The output of the aligner is + // No cross-time series reduction. The output of the `Aligner` is // returned. REDUCE_NONE = 0; - // Reduce by computing the mean across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric or distribution values. The value type of the - // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the mean value across time series for each + // alignment period. This reducer is valid for + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + // [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with + // numeric or distribution values. The `value_type` of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. REDUCE_MEAN = 1; - // Reduce by computing the minimum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the minimum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MIN = 2; - // Reduce by computing the maximum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the maximum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MAX = 3; // Reduce by computing the sum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric and distribution values. The value type of - // the output is the same as the value type of the input. + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric and distribution values. The `value_type` of the output is + // the same as the `value_type` of the input. REDUCE_SUM = 4; // Reduce by computing the standard deviation across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics with numeric or distribution values. The value type of - // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics with numeric or distribution values. The `value_type` + // of the output is `DOUBLE`. REDUCE_STDDEV = 5; - // Reduce by computing the count of data points across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics of numeric, Boolean, distribution, and string value - // type. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of data points across time series + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of numeric, Boolean, distribution, and string + // `value_type`. The `value_type` of the output is `INT64`. REDUCE_COUNT = 6; - // Reduce by computing the count of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `True`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_TRUE = 7; - // Reduce by computing the count of False-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `False`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_FALSE = 15; - // Reduce by computing the fraction of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The output value is in the - // range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the ratio of the number of `True`-valued data points + // to the total number of data points for each alignment period. This + // reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + // The output value is in the range [0.0, 1.0] and has `value_type` + // `DOUBLE`. REDUCE_FRACTION_TRUE = 8; - // Reduce by computing 99th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [99th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_99 = 9; - // Reduce by computing 95th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [95th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_95 = 10; - // Reduce by computing 50th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [50th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_50 = 11; - // Reduce by computing 5th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [5th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_05 = 12; } - // The alignment period for per-[time series][TimeSeries] - // alignment. If present, `alignmentPeriod` must be at least 60 - // seconds. After per-time series alignment, each time series will - // contain data points only on the period boundaries. If - // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then - // this field is ignored. If `perSeriesAligner` is specified and - // does not equal `ALIGN_NONE`, then this field must be defined; - // otherwise an error is returned. + // The `alignment_period` specifies a time interval, in seconds, that is used + // to divide the data in all the + // [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + // time. This will be done before the per-series aligner can be applied to + // the data. + // + // The value must be at least 60 seconds. If a per-series aligner other than + // `ALIGN_NONE` is specified, this field is required or an error is returned. + // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is + // specified, then this field is ignored. google.protobuf.Duration alignment_period = 1; - // The approach to be used to align individual time series. Not all - // alignment functions may be applied to all time series, depending - // on the metric type and value type of the original time - // series. Alignment may change the metric type or the value type of + // An `Aligner` describes how to bring the data points in a single + // time series into temporal alignment. Except for `ALIGN_NONE`, all + // alignments cause all the data points in an `alignment_period` to be + // mathematically grouped together, resulting in a single data point for + // each `alignment_period` with end timestamp at the end of the period. + // + // Not all alignment operations may be applied to all time series. The valid + // choices depend on the `metric_kind` and `value_type` of the original time + // series. Alignment can change the `metric_kind` or the `value_type` of // the time series. // // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is + // series reduction. If `cross_series_reducer` is specified, then + // `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + // and `alignment_period` must be specified; otherwise, an error is // returned. Aligner per_series_aligner = 2; - // The approach to be used to combine time series. Not all reducer - // functions may be applied to all time series, depending on the - // metric type and the value type of the original time - // series. Reduction may change the metric type of value type of the - // time series. + // The reduction operation to be used to combine time series into a single + // time series, where the value of each data point in the resulting series is + // a function of all the already aligned values in the input time series. // - // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is - // returned. + // Not all reducer operations can be applied to all time series. The valid + // choices depend on the `metric_kind` and the `value_type` of the original + // time series. Reduction can yield a time series with a different + // `metric_kind` or `value_type` than the input time series. + // + // Time series data must first be aligned (see `per_series_aligner`) in order + // to perform cross-time series reduction. If `cross_series_reducer` is + // specified, then `per_series_aligner` must be specified, and must not be + // `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + // error is returned. Reducer cross_series_reducer = 4; - // The set of fields to preserve when `crossSeriesReducer` is - // specified. The `groupByFields` determine how the time series are + // The set of fields to preserve when `cross_series_reducer` is + // specified. The `group_by_fields` determine how the time series are // partitioned into subsets prior to applying the aggregation - // function. Each subset contains time series that have the same + // operation. Each subset contains time series that have the same // value for each of the grouping fields. Each individual time // series is a member of exactly one subset. The - // `crossSeriesReducer` is applied to each subset of time series. + // `cross_series_reducer` is applied to each subset of time series. // It is not possible to reduce across different resource types, so // this field implicitly contains `resource.type`. Fields not - // specified in `groupByFields` are aggregated away. If - // `groupByFields` is not specified and all the time series have + // specified in `group_by_fields` are aggregated away. If + // `group_by_fields` is not specified and all the time series have // the same resource type, then the time series are aggregated into - // a single output time series. If `crossSeriesReducer` is not + // a single output time series. If `cross_series_reducer` is not // defined, this field is ignored. repeated string group_by_fields = 5; } // Describes a ranking-based time series filter. Each input time series is -// ranked with an aligner. The filter lets through up to `num_time_series` time -// series, selecting them based on the relative ranking. +// ranked with an aligner. The filter will allow up to `num_time_series` time +// series to pass through it, selecting them based on the relative ranking. +// +// For example, if `ranking_method` is `METHOD_MEAN`,`direction` is `BOTTOM`, +// and `num_time_series` is 3, then the 3 times series with the lowest mean +// values will pass through the filter. message PickTimeSeriesFilter { - // The value reducers that can be applied to a PickTimeSeriesFilter. + // The value reducers that can be applied to a `PickTimeSeriesFilter`. enum Method { - // Not allowed in well-formed requests. + // Not allowed. You must specify a different `Method` if you specify a + // `PickTimeSeriesFilter`. METHOD_UNSPECIFIED = 0; // Select the mean of all values. @@ -353,21 +401,23 @@ message PickTimeSeriesFilter { // Describes the ranking directions. enum Direction { - // Not allowed in well-formed requests. + // Not allowed. You must specify a different `Direction` if you specify a + // `PickTimeSeriesFilter`. DIRECTION_UNSPECIFIED = 0; - // Pass the highest ranking inputs. + // Pass the highest `num_time_series` ranking inputs. TOP = 1; - // Pass the lowest ranking inputs. + // Pass the lowest `num_time_series` ranking inputs. BOTTOM = 2; } - // `rankingMethod` is applied to each time series independently to produce the - // value which will be used to compare the time series to other time series. + // `ranking_method` is applied to each time series independently to produce + // the value which will be used to compare the time series to other time + // series. Method ranking_method = 1; - // How many time series to return. + // How many time series to allow to pass through the filter. int32 num_time_series = 2; // How to use the ranking to select time series that pass through the filter. @@ -376,6 +426,7 @@ message PickTimeSeriesFilter { // A filter that ranks streams based on their statistical relation to other // streams in a request. +// Note: This field is deprecated and completely ignored by the API. message StatisticalTimeSeriesFilter { // The filter methods that can be applied to a stream. enum Method { diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index b973f4e4723..7a25776ec25 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,28 +11,34 @@ // WITHOUT 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.monitoring.dashboard.v1; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/layouts.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DashboardsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A Google Stackdriver dashboard. Dashboards define the content and layout // of pages in the Stackdriver web application. message Dashboard { - // The resource name of the dashboard. - string name = 1; + option (google.api.resource) = { + type: "monitoring.googleapis.com/Dashboard" + pattern: "projects/{project}/dashboards/{dashboard}" + }; + + // Immutable. The resource name of the dashboard. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The mutable, human-readable name. - string display_name = 2; + // Required. The mutable, human-readable name. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; // `etag` is used for optimistic concurrency control as a way to help // prevent simultaneous updates of a policy from overwriting each other. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index 83dbc214901..a7cbef56ee9 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -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"; @@ -19,16 +18,17 @@ package google.monitoring.dashboard.v1; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/dashboard.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DashboardsServiceProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // Manages Stackdriver dashboards. A dashboard is an arrangement of data display // widgets in a specific layout. @@ -100,9 +100,11 @@ service DashboardsService { // The `CreateDashboard` request. message CreateDashboardRequest { - // Required. The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. The {project_id_or_number} must match - // the dashboard resource name. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + // + // The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The initial dashboard specification. @@ -111,9 +113,15 @@ message CreateDashboardRequest { // The `ListDashboards` request. message ListDashboardsRequest { - // Required. The scope of the dashboards to list. A project scope must be - // specified in the form of `"projects/{project_id_or_number}"`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The scope of the dashboards to list. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; // A positive number that is the maximum number of results to return. // If unspecified, a default of 1000 is used. @@ -132,24 +140,36 @@ message ListDashboardsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetDashboard` request. message GetDashboardRequest { - // Required. The resource name of the Dashboard. The format is one of - // `"dashboards/{dashboard_id}"` (for system dashboards) or - // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"` - // (for custom dashboards). - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The resource name of the Dashboard. The format is one of: + // + // - `dashboards/[DASHBOARD_ID]` (for system dashboards) + // - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` + // (for custom dashboards). + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Dashboard" + } + ]; } // The `DeleteDashboard` request. message DeleteDashboardRequest { - // Required. The resource name of the Dashboard. The format is - // `"projects/{project_id_or_number}/dashboards/{dashboard_id}"`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The resource name of the Dashboard. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Dashboard" + } + ]; } // The `UpdateDashboard` request. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index d551b48d03c..0080df5c754 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,14 +11,15 @@ // WITHOUT 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.monitoring.dashboard.v1; +import "google/monitoring/dashboard/v1/common.proto"; + option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "DrilldownsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index 278c7705063..acc0517c332 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -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"; @@ -20,10 +19,10 @@ package google.monitoring.dashboard.v1; import "google/monitoring/dashboard/v1/widget.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "LayoutsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A basic layout divides the available space into vertical columns of equal // width and arranges a list of widgets using a row-first strategy. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index 1487c3003d4..2fff1d20a22 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -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"; @@ -21,10 +20,10 @@ import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/common.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "MetricsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // TimeSeriesQuery collects the set of supported methods for querying time // series data from the Stackdriver metrics API. @@ -36,23 +35,26 @@ message TimeSeriesQuery { // Parameters to fetch a ratio between two time series filters. TimeSeriesFilterRatio time_series_filter_ratio = 2; + + // A query used to fetch time series. + string time_series_query_language = 3; } // The unit of data contained in fetched time series. If non-empty, this // unit will override any unit that accompanies fetched data. The format is // the same as the - // [`unit`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) + // [`unit`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) // field in `MetricDescriptor`. string unit_override = 5; } // A filter that defines a subset of time series data that is displayed in a // widget. Time series data is fetched using the -// [`ListTimeSeries`](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) +// [`ListTimeSeries`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) // method. message TimeSeriesFilter { - // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the - // metric types, resources, and projects to query. + // Required. The [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // that identifies the metric types, resources, and projects to query. string filter = 1 [(google.api.field_behavior) = REQUIRED]; // By default, the raw time series data is returned. @@ -60,13 +62,17 @@ message TimeSeriesFilter { // data. Aggregation aggregation = 2; + // Apply a second aggregation after `aggregation` is applied. + Aggregation secondary_aggregation = 3; + // Selects an optional time series filter. oneof output_filter { // Ranking based time series filter. PickTimeSeriesFilter pick_time_series_filter = 4; // Statistics based time series filter. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + // Note: This field is deprecated and completely ignored by the API. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; } } @@ -77,8 +83,9 @@ message TimeSeriesFilterRatio { // Describes a query to build the numerator or denominator of a // TimeSeriesFilterRatio. message RatioPart { - // Required. The [monitoring filter](/monitoring/api/v3/filters) that identifies the - // metric types, resources, and projects to query. + // Required. The [monitoring + // filter](https://cloud.google.com/monitoring/api/v3/filters) that + // identifies the metric types, resources, and projects to query. string filter = 1 [(google.api.field_behavior) = REQUIRED]; // By default, the raw time series data is returned. @@ -103,7 +110,8 @@ message TimeSeriesFilterRatio { PickTimeSeriesFilter pick_time_series_filter = 4; // Statistics based time series filter. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5; + // Note: This field is deprecated and completely ignored by the API. + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index dd2633beca1..1820c031193 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,20 +11,20 @@ // WITHOUT 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.monitoring.dashboard.v1; +import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "ScorecardProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A widget showing the latest value of a metric, and how this value relates to // one or more thresholds. @@ -47,8 +47,8 @@ message Scorecard { // to show up on a Scorecard, showing recent trends of the scorecard's // timeseries. message SparkChartView { - // The type of sparkchart to show in this chartView. - SparkChartType spark_chart_type = 1; + // Required. The type of sparkchart to show in this chartView. + SparkChartType spark_chart_type = 1 [(google.api.field_behavior) = REQUIRED]; // The lower bound on data point frequency in the chart implemented by // specifying the minimum alignment period to use in a time series query. @@ -58,9 +58,9 @@ message Scorecard { google.protobuf.Duration min_alignment_period = 2; } - // Fields for querying time series data from the + // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1; + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; // Defines the optional additional chart shown on the scorecard. If // neither is included - then a default scorecard is shown. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 1d215107726..5bb41ec598a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,14 +11,13 @@ // WITHOUT 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.monitoring.dashboard.v1; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 537daeacb5e..acc1671fcb2 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,17 +11,16 @@ // WITHOUT 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.monitoring.dashboard.v1; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "TextProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A widget that displays textual content. message Text { diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index cb9282af892..12b5a698b87 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -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"; @@ -24,10 +23,10 @@ import "google/monitoring/dashboard/v1/xychart.proto"; import "google/protobuf/empty.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "WidgetProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // Widget contains a single dashboard component and configuration of how to // present the component in the dashboard. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index 3d768b7bc46..d241ae783d9 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -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"; @@ -22,10 +21,10 @@ import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; -option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; option java_multiple_files = true; option java_outer_classname = "XyChartProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A chart that displays data on a 2D (X and Y axes) plane. message XyChart { @@ -58,15 +57,15 @@ message XyChart { HEATMAP = 4; } - // Fields for querying time series data from the + // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1; + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; // How this data should be plotted on the chart. PlotType plot_type = 2; // A template string for naming `TimeSeries` in the resulting data set. - // This should be a string with interpolations of the form ${label_name}, + // This should be a string with interpolations of the form `${label_name}`, // which will resolve to the label's value. string legend_template = 3; @@ -99,8 +98,8 @@ message XyChart { Scale scale = 2; } - // The data displayed in this chart. - repeated DataSet data_sets = 1; + // Required. The data displayed in this chart. + repeated DataSet data_sets = 1 [(google.api.field_behavior) = REQUIRED]; // The duration used to display a comparison chart. A comparison chart // simultaneously shows values from two similar-length time periods diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 15b38e21cb0..e8664abe28b 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -20,6 +20,198 @@ export namespace google { /** Namespace protobuf. */ namespace protobuf { + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a 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 { @@ -1677,6 +1869,9 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ @@ -1849,6 +2044,9 @@ export namespace google { /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } /** Represents a MessageOptions. */ @@ -1972,6 +2170,9 @@ 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. */ @@ -4825,6 +5026,9 @@ export namespace google { /** TimeSeriesQuery timeSeriesFilterRatio */ timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + /** TimeSeriesQuery timeSeriesQueryLanguage */ + timeSeriesQueryLanguage?: (string|null); + /** TimeSeriesQuery unitOverride */ unitOverride?: (string|null); } @@ -4844,11 +5048,14 @@ export namespace google { /** TimeSeriesQuery timeSeriesFilterRatio. */ public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + /** TimeSeriesQuery timeSeriesQueryLanguage. */ + public timeSeriesQueryLanguage: string; + /** TimeSeriesQuery unitOverride. */ public unitOverride: string; /** TimeSeriesQuery source. */ - public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"); + public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"); /** * Creates a new TimeSeriesQuery instance using the specified properties. @@ -4930,6 +5137,9 @@ export namespace google { /** TimeSeriesFilter aggregation */ aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** TimeSeriesFilter secondaryAggregation */ + secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** TimeSeriesFilter pickTimeSeriesFilter */ pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); @@ -4952,6 +5162,9 @@ export namespace google { /** TimeSeriesFilter aggregation. */ public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** TimeSeriesFilter secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** TimeSeriesFilter pickTimeSeriesFilter. */ public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); @@ -6635,14 +6848,969 @@ export namespace google { /** Namespace api. */ namespace api { - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 + /** Properties of a Distribution. */ + interface IDistribution { + + /** Distribution count */ + count?: (number|Long|string|null); + + /** Distribution mean */ + mean?: (number|null); + + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); + + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { + + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); + + /** Distribution count. */ + public count: (number|Long|string); + + /** Distribution mean. */ + public mean: number; + + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; + + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; + + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; + + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @throws {Error} If the payload is not 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.Distribution; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @throws {Error} If the payload 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.Distribution; + + /** + * Verifies a Distribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Distribution { + + /** Properties of a Range. */ + interface IRange { + + /** Range min */ + min?: (number|null); + + /** Range max */ + max?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not 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.Distribution.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload 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.Distribution.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BucketOptions. */ + interface IBucketOptions { + + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } + + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { + + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); + + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketOptions instance + */ + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketOptions + * @throws {Error} If the payload is not 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.Distribution.BucketOptions; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketOptions + * @throws {Error} If the payload 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.Distribution.BucketOptions; + + /** + * Verifies a BucketOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketOptions + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BucketOptions { + + /** Properties of a Linear. */ + interface ILinear { + + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Linear width */ + width?: (number|null); + + /** Linear offset */ + offset?: (number|null); + } + + /** Represents a Linear. */ + class Linear implements ILinear { + + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Linear width. */ + public width: number; + + /** Linear offset. */ + public offset: number; + + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Linear; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @throws {Error} If the payload 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.Distribution.BucketOptions.Linear; + + /** + * Verifies a Linear message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Exponential. */ + interface IExponential { + + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Exponential growthFactor */ + growthFactor?: (number|null); + + /** Exponential scale */ + scale?: (number|null); + } + + /** Represents an Exponential. */ + class Exponential implements IExponential { + + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Exponential growthFactor. */ + public growthFactor: number; + + /** Exponential scale. */ + public scale: number; + + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Exponential; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @throws {Error} If the payload 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.Distribution.BucketOptions.Exponential; + + /** + * Verifies an Exponential message. + * @param message Plain 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 Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Explicit. */ + interface IExplicit { + + /** Explicit bounds */ + bounds?: (number[]|null); + } + + /** Represents an Explicit. */ + class Explicit implements IExplicit { + + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + + /** Explicit bounds. */ + public bounds: number[]; + + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Explicit; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @throws {Error} If the payload 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.Distribution.BucketOptions.Explicit; + + /** + * Verifies an Explicit message. + * @param message Plain 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 Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Exemplar. */ + interface IExemplar { + + /** Exemplar value */ + value?: (number|null); + + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } + + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { + + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); + + /** Exemplar value. */ + public value: number; + + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; + + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @throws {Error} If the payload is not 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.Distribution.Exemplar; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @throws {Error} If the payload 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.Distribution.Exemplar; + + /** + * Verifies an Exemplar message. + * @param message Plain 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 Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** 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); + } + + /** 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; + + /** + * 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 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } /** Properties of a Http. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 024feb2f9c0..1ed60570dc4 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -48,25 +48,25 @@ */ var protobuf = {}; - protobuf.Duration = (function() { + protobuf.Any = (function() { /** - * Properties of a Duration. + * Properties of an Any. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Duration. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Duration(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74,88 +74,88 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Any.prototype.type_url = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Duration.prototype.nanos = 0; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Duration instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Any.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); + 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 Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.decode = function decode(reader, length) { + 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.Duration(); + 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.seconds = reader.int64(); + message.type_url = reader.string(); break; case 2: - message.nanos = reader.int32(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -166,131 +166,126 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + Any.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"; + 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 a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Any} Any */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) 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; + 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 a Duration message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Any.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; + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - 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; + 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 Duration to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Any; })(); - protobuf.FileDescriptorSet = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new FileDescriptorSet. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -298,78 +293,88 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * 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.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + Timestamp.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(); + 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 FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @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.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decode = function decode(reader, length) { + 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.FileDescriptorSet(); + 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: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -380,142 +385,131 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @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 */ - FileDescriptorSet.verify = function verify(message) { + Timestamp.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; - } - } + 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.Timestamp} Timestamp */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) 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]); - } - } + 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 FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + Timestamp.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); + 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 FileDescriptorSet to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorSet; + return Timestamp; })(); - protobuf.FileDescriptorProto = (function() { + protobuf.Duration = (function() { /** - * Properties of a FileDescriptorProto. + * Properties of a Duration. * @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 + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new FileDescriptorProto. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -523,249 +517,88 @@ } /** - * 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 + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - FileDescriptorProto.prototype.syntax = ""; + Duration.prototype.nanos = 0; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + Duration.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); + 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 FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @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.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decode = function decode(reader, length) { + 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.FileDescriptorProto(); + 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.name = reader.string(); + message.seconds = reader.int64(); 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(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -776,329 +609,131 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @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 */ - FileDescriptorProto.verify = function verify(message) { + Duration.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"; + 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.Duration} Duration */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) 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); + 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 FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + Duration.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 ($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.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; + 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 FileDescriptorProto to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorProto; + return Duration; })(); - protobuf.DescriptorProto = (function() { + protobuf.FileDescriptorSet = (function() { /** - * Properties of a DescriptorProto. + * Properties of a FileDescriptorSet. * @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 + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file */ /** - * Constructs a new DescriptorProto. + * Constructs a new FileDescriptorSet. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function FileDescriptorSet(properties) { + this.file = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1106,216 +741,78 @@ } /** - * 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 + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + FileDescriptorSet.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]); + 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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a FileDescriptorSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @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.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decode = function decode(reader, length) { + 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.DescriptorProto(); + 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: - 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()); + 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); @@ -1326,848 +823,395 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a FileDescriptorSet message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @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 */ - DescriptorProto.verify = function verify(message) { + FileDescriptorSet.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 (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 "reservedRange." + error; + return "file." + 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. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) 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]); + 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]); } } - 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. + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + FileDescriptorSet.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]; + 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 DescriptorProto to JSON. + * Converts this FileDescriptorSet to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + FileDescriptorSet.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 - */ + return FileDescriptorSet; + })(); - /** - * 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]]; - } + protobuf.FileDescriptorProto = (function() { - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * 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 + */ - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + /** + * 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]]; + } - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - /** - * 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); - }; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * 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; - }; + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * 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(); - }; + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * 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; - }; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * 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()); - }; + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - /** - * 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; - }; + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; - /** - * 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() { + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * 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]]; - } + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a FileDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @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.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decode = function decode(reader, length) { + 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.ExtensionRangeOptions(); + 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 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 1: + message.name = reader.string(); break; - default: - reader.skipType(tag & 7); + 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; } } @@ -2175,340 +1219,546 @@ }; /** - * 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 + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @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 */ - 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; + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object + * 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 */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + 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; }; - 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 + * 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 */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + 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; + }; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * 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 */ - FieldDescriptorProto.prototype.type = 1; + 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; + }; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.typeName = ""; + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * 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 */ - FieldDescriptorProto.prototype.extendee = ""; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - FieldDescriptorProto.prototype.defaultValue = ""; + 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]]; + } /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + DescriptorProto.prototype.name = ""; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + DescriptorProto.prototype.field = $util.emptyArray; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldDescriptorProto.prototype.options = null; + DescriptorProto.prototype.extension = $util.emptyArray; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + DescriptorProto.prototype.nestedType = $util.emptyArray; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * 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.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, 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.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.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.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); + $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 FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a DescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @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.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decode = function decode(reader, length) { + 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.FieldDescriptorProto(); + 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: - message.number = reader.int32(); + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); break; case 4: - message.label = reader.int32(); + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); break; case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); break; - case 2: - message.extendee = reader.string(); + 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.defaultValue = reader.string(); + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); break; case 9: - message.oneofIndex = reader.int32(); + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); 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(); + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -2519,725 +1769,845 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies a DescriptorProto message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @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 */ - FieldDescriptorProto.verify = function verify(message) { + 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.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.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.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"; + 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); + var message = new $root.google.protobuf.DescriptorProto(); 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; + 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]); + } } - 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.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.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); + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.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 = {}; + 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.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.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.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; + 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 FieldDescriptorProto to JSON. + * Converts this DescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.DescriptorProto * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + DescriptorProto.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; - })(); + DescriptorProto.ExtensionRange = (function() { - return FieldDescriptorProto; - })(); + /** + * 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 + */ - protobuf.OneofDescriptorProto = (function() { + /** + * 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]]; + } - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * 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]]; - } + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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; + /** + * 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 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()); - }; + return message; + }; - /** - * 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; - }; + /** + * 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()); + }; - /** - * 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; - }; + /** + * 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 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; - }; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - return OneofDescriptorProto; - })(); + /** + * 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); + }; - protobuf.EnumDescriptorProto = (function() { + return ExtensionRange; + })(); - /** - * 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 - */ + DescriptorProto.ReservedRange = (function() { - /** - * 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]]; - } + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + /** + * 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]]; + } - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * 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); + }; - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * 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; + }; - /** - * 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 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(); + }; - /** - * 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]); + /** + * 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 EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @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.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decode = function decode(reader, length) { + 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.EnumDescriptorProto(); + 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 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()); + 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); @@ -3248,507 +2618,340 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies an ExtensionRangeOptions message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @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 */ - EnumDescriptorProto.verify = function verify(message) { + ExtensionRangeOptions.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 (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 "reservedRange." + error; + return "uninterpretedOption." + 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. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) 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]); + 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]); } } - 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. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + ExtensionRangeOptions.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]; + 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 EnumDescriptorProto to JSON. + * Converts this ExtensionRangeOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ExtensionRangeOptions * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + ExtensionRangeOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - EnumDescriptorProto.EnumReservedRange = (function() { + return ExtensionRangeOptions; + })(); - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ + protobuf.FieldDescriptorProto = (function() { - /** - * 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]]; - } + /** + * 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 + */ - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; + /** + * 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]]; + } - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - /** - * 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); - }; + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - /** - * 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; - }; + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * 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; - })(); + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - return EnumDescriptorProto; - })(); + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - protobuf.EnumValueDescriptorProto = (function() { + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; /** - * 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 + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ + FieldDescriptorProto.prototype.defaultValue = ""; /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ - 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]]; - } + FieldDescriptorProto.prototype.oneofIndex = 0; /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.name = ""; + FieldDescriptorProto.prototype.jsonName = ""; /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.number = 0; + FieldDescriptorProto.prototype.options = null; /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.options = null; + FieldDescriptorProto.prototype.proto3Optional = false; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, 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 2, wireType 0 =*/16).int32(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.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $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 EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto + * @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.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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 */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + 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.EnumValueDescriptorProto(); + 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 2: + case 3: message.number = reader.int32(); break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + 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); @@ -3759,30 +2962,30 @@ }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @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 */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies a FieldDescriptorProto message. * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto + * @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 */ - EnumValueDescriptorProto.verify = function verify(message) { + FieldDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -3791,100 +2994,335 @@ 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.EnumValueOptions.verify(message.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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); + 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.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + 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 an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + 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.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + 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 */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueDescriptorProto; + /** + * 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.ServiceDescriptorProto = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of an OneofDescriptorProto. * @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 + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new OneofDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3892,91 +3330,80 @@ } /** - * ServiceDescriptorProto name. + * OneofDescriptorProto name. * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + OneofDescriptorProto.prototype.name = ""; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - ServiceDescriptorProto.prototype.options = null; + OneofDescriptorProto.prototype.options = null; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, 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.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(); + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @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.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decode = function decode(reader, length) { + 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.ServiceDescriptorProto(); + 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) { @@ -3984,12 +3411,7 @@ 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()); + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4000,46 +3422,37 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies an OneofDescriptorProto message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.verify = function verify(message) { + 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.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); + var error = $root.google.protobuf.OneofOptions.verify(message.options); if (error) return "options." + error; } @@ -4047,105 +3460,90 @@ }; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); + var message = new $root.google.protobuf.OneofDescriptorProto(); 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); + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + OneofDescriptorProto.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); + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceDescriptorProto; + return OneofDescriptorProto; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.EnumDescriptorProto = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of an EnumDescriptorProto. * @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 + * @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 MethodDescriptorProto. + * Constructs a new EnumDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + 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) @@ -4153,120 +3551,113 @@ } /** - * MethodDescriptorProto name. + * EnumDescriptorProto name. * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodDescriptorProto.prototype.inputType = ""; + EnumDescriptorProto.prototype.name = ""; /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodDescriptorProto.prototype.options = null; + EnumDescriptorProto.prototype.options = null; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, 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.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.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.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); + $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 MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @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.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decode = function decode(reader, length) { + 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.MethodDescriptorProto(); + 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) { @@ -4274,19 +3665,22 @@ message.name = reader.string(); break; case 2: - message.inputType = reader.string(); + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); break; case 3: - message.outputType = reader.string(); + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); break; case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); break; case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -4297,513 +3691,507 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @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 */ - MethodDescriptorProto.verify = function verify(message) { + 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.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.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.MethodOptions.verify(message.options); + var error = $root.google.protobuf.EnumOptions.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"; + 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 a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); + var message = new $root.google.protobuf.EnumDescriptorProto(); 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.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.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + 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]); } - 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. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + 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.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.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.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; + 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 MethodDescriptorProto to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MethodDescriptorProto; - })(); + EnumDescriptorProto.EnumReservedRange = (function() { - protobuf.FileOptions = (function() { + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - */ + /** + * Constructs a new 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]]; + } - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * 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); + }; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * 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; + }; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * 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(); + }; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * 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; + }; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * 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()); + }; - /** - * 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; + /** + * 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; + }; - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + /** + * 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; + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * 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; + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * 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); + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + return EnumReservedRange; + })(); - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + return EnumDescriptorProto; + })(); - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + protobuf.EnumValueDescriptorProto = (function() { /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance + * 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 */ - FileOptions.prototype.phpClassPrefix = ""; /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - FileOptions.prototype.phpNamespace = ""; + 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]]; + } /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - FileOptions.prototype.phpMetadataNamespace = ""; + EnumValueDescriptorProto.prototype.name = ""; /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - FileOptions.prototype.rubyPackage = ""; + EnumValueDescriptorProto.prototype.number = 0; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumValueDescriptorProto.prototype.options = null; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + EnumValueDescriptorProto.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.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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @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.FileOptions} FileOptions + * @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 */ - FileOptions.decode = function decode(reader, length) { + 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.FileOptions(); + 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.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(); + message.name = reader.string(); break; - case 45: - message.rubyPackage = reader.string(); + case 2: + message.number = reader.int32(); break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4814,325 +4202,132 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @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 */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies an EnumValueDescriptorProto message. * @function verify - * @memberof google.protobuf.FileOptions + * @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 */ - FileOptions.verify = function verify(message) { + EnumValueDescriptorProto.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.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 a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) 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]); - } + 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 a FileOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + 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 FileOptions to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + EnumValueDescriptorProto.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; + return EnumValueDescriptorProto; })(); - protobuf.MessageOptions = (function() { + protobuf.ServiceDescriptorProto = (function() { /** - * Properties of a MessageOptions. + * Properties of a ServiceDescriptorProto. * @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 + * @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 MessageOptions. + * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5140,133 +4335,107 @@ } /** - * 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 + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - MessageOptions.prototype.deprecated = false; + ServiceDescriptorProto.prototype.name = ""; /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - MessageOptions.prototype.mapEntry = false; + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceDescriptorProto.prototype.options = null; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + ServiceDescriptorProto.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.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 MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @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.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decode = function decode(reader, length) { + 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.MessageOptions(); + 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.messageSetWireFormat = reader.bool(); + message.name = reader.string(); break; case 2: - message.noStandardDescriptorAccessor = reader.bool(); + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); break; case 3: - message.deprecated = reader.bool(); + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); 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); + default: + reader.skipType(tag & 7); break; } } @@ -5274,167 +4443,152 @@ }; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageOptions message. + * Verifies a ServiceDescriptorProto message. * @function verify - * @memberof google.protobuf.MessageOptions + * @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 */ - MessageOptions.verify = function verify(message) { + ServiceDescriptorProto.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 (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 "uninterpretedOption." + 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) 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]); + 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 MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; + object.method = []; if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; + object.name = ""; + object.options = 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.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 MessageOptions to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageOptions; + return ServiceDescriptorProto; })(); - protobuf.FieldOptions = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a FieldOptions. + * Properties of a MethodDescriptorProto. * @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 + * @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 FieldOptions. + * Constructs a new MethodDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5442,180 +4596,140 @@ } /** - * 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 + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype.jstype = 0; + MethodDescriptorProto.prototype.name = ""; /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype.lazy = false; + MethodDescriptorProto.prototype.inputType = ""; /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype.deprecated = false; + MethodDescriptorProto.prototype.outputType = ""; /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype.weak = false; + MethodDescriptorProto.prototype.options = null; /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + MethodDescriptorProto.prototype.clientStreaming = false; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + MethodDescriptorProto.prototype.serverStreaming = false; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + MethodDescriptorProto.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.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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @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.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decode = function decode(reader, length) { + 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.FieldOptions(); + 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.ctype = reader.int32(); + message.name = reader.string(); break; case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); + message.inputType = reader.string(); break; case 3: - message.deprecated = reader.bool(); + message.outputType = reader.string(); break; - case 10: - message.weak = reader.bool(); + case 4: + message.options = $root.google.protobuf.MethodOptions.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())); + case 5: + message.clientStreaming = reader.bool(); 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()); + case 6: + message.serverStreaming = reader.bool(); break; default: reader.skipType(tag & 7); @@ -5626,299 +4740,176 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies a MethodDescriptorProto message. * @function verify - * @memberof google.protobuf.FieldOptions + * @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 */ - FieldOptions.verify = function verify(message) { + MethodDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } + 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) 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; + 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.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + 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 FieldOptions to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + MethodDescriptorProto.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; + return MethodDescriptorProto; })(); - protobuf.OneofOptions = (function() { + protobuf.FileOptions = (function() { /** - * Properties of an OneofOptions. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @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 OneofOptions. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function OneofOptions(properties) { + 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) @@ -5926,315 +4917,355 @@ } /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + FileOptions.prototype.javaPackage = ""; /** - * 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 + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; + FileOptions.prototype.javaOuterClassname = ""; /** - * 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 + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - }; + FileOptions.prototype.javaMultipleFiles = false; /** - * 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 + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + FileOptions.prototype.javaGenerateEqualsAndHash = false; /** - * 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 + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - }; + FileOptions.prototype.javaStringCheckUtf8 = false; /** - * 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 + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + FileOptions.prototype.optimizeFor = 1; /** - * 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 + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - }; + FileOptions.prototype.goPackage = ""; /** - * 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 + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - }; + FileOptions.prototype.ccGenericServices = false; /** - * 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 + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - }; + FileOptions.prototype.javaGenericServices = false; /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions * @instance - * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FileOptions.prototype.pyGenericServices = false; - return OneofOptions; - })(); + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - protobuf.EnumOptions = (function() { + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; /** - * 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 + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance */ + FileOptions.prototype.ccEnableArenas = true; /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance */ - 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]]; - } + FileOptions.prototype.objcClassPrefix = ""; /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions * @instance */ - EnumOptions.prototype.allowAlias = false; + FileOptions.prototype.csharpNamespace = ""; /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions * @instance */ - EnumOptions.prototype.deprecated = false; + FileOptions.prototype.swiftPrefix = ""; /** - * EnumOptions uninterpretedOption. + * 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.EnumOptions + * @memberof google.protobuf.FileOptions * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + FileOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumOptions instance using the specified properties. + * 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.EnumOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + FileOptions.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; - }; + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @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.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decode = function decode(reader, length) { + 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.EnumOptions(); + 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 2: - message.allowAlias = reader.bool(); + case 1: + message.javaPackage = reader.string(); break; - case 3: + 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; @@ -6244,38 +5275,98 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.EnumOptions + * @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 */ - EnumOptions.verify = function verify(message) { + FileOptions.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.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"; @@ -6285,102 +5376,250 @@ 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 an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.FileOptions} FileOptions */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); + 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.uninterpretedOption) { + 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.EnumOptions.uninterpretedOption: array expected"); + 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.EnumOptions.uninterpretedOption: object expected"); + 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 an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { 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.allowAlias = false; + 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.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; + 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 EnumOptions to JSON. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumOptions; + /** + * 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.EnumValueOptions = (function() { + protobuf.MessageOptions = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a MessageOptions. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @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 EnumValueOptions. + * Constructs a new MessageOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - function EnumValueOptions(properties) { + function MessageOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -6389,92 +5628,144 @@ } /** - * EnumValueOptions deprecated. + * 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.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @instance */ - EnumValueOptions.prototype.deprecated = false; + MessageOptions.prototype.deprecated = false; /** - * EnumValueOptions uninterpretedOption. + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueOptions instance using the specified properties. + * 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.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, 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 1, wireType 0 =*/8).bool(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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @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.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decode = function decode(reader, length) { + 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.EnumValueOptions(); + 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; @@ -6484,35 +5775,44 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a MessageOptions message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @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 */ - EnumValueOptions.verify = function verify(message) { + MessageOptions.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.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"; @@ -6522,99 +5822,134 @@ 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 an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.MessageOptions} MessageOptions */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - var message = new $root.google.protobuf.EnumValueOptions(); + 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.EnumValueOptions.uninterpretedOption: array expected"); + 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.EnumValueOptions.uninterpretedOption: object expected"); + 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 an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) + 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 EnumValueOptions to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueOptions; + return MessageOptions; })(); - protobuf.ServiceOptions = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a ServiceOptions. + * Properties of a FieldOptions. * @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 + * @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 ServiceOptions. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function ServiceOptions(properties) { + 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) @@ -6622,117 +5957,193 @@ } /** - * ServiceOptions deprecated. + * 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.ServiceOptions + * @memberof google.protobuf.FieldOptions * @instance */ - ServiceOptions.prototype.deprecated = false; + FieldOptions.prototype.deprecated = false; /** - * ServiceOptions uninterpretedOption. + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, 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 33, wireType 0 =*/264).bool(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.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"]); + 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 ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @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.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decode = function decode(reader, length) { + 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.ServiceOptions(); + 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 33: + 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 1049: - message[".google.api.defaultHost"] = reader.string(); + 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 1050: - message[".google.api.oauthScopes"] = reader.string(); + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6743,35 +6154,62 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @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 */ - ServiceOptions.verify = function verify(message) { + 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"; @@ -6781,118 +6219,247 @@ 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"; + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.FieldOptions} FieldOptions */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.protobuf.ServiceOptions(); + 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.ServiceOptions.uninterpretedOption: array expected"); + 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.ServiceOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.FieldOptions.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"]); + 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; + } + } + 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 ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + 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[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + 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.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"]; + 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 ServiceOptions to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + /** + * 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.MethodOptions = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of a MethodOptions. + * Properties of an OneofOptions. * @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 + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new MethodOptions. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function MethodOptions(properties) { + function OneofOptions(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) @@ -6900,134 +6467,79 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - MethodOptions.prototype.deprecated = false; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @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.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decode = function decode(reader, length) { + 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.MethodOptions(); + 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 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; case 999: if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -7037,44 +6549,32 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.protobuf.MethodOptions + * @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 */ - MethodOptions.verify = function verify(message) { + OneofOptions.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"; @@ -7084,170 +6584,92 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.OneofOptions} OneofOptions */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) 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; - } + var message = new $root.google.protobuf.OneofOptions(); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + 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.MethodOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + OneofOptions.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; + return OneofOptions; })(); - protobuf.UninterpretedOption = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of an UninterpretedOption. + * Properties of an EnumOptions. * @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 + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new UninterpretedOption. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7255,156 +6677,104 @@ } /** - * 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 + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + EnumOptions.prototype.allowAlias = false; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + EnumOptions.prototype.deprecated = false; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + EnumOptions.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); + 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @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.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decode = function decode(reader, length) { + 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.UninterpretedOption(); + 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: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + message.allowAlias = reader.bool(); 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(); + message.deprecated = reader.bool(); break; - case 8: - message.aggregateValue = reader.string(); + 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); @@ -7415,501 +6785,236 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @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 */ - UninterpretedOption.verify = function verify(message) { + EnumOptions.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 (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 "name." + error; + return "uninterpretedOption." + 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. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.EnumOptions} EnumOptions */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) 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]); + 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]); } } - 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. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.name = []; + object.uninterpretedOption = []; 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 = ""; + object.allowAlias = false; + object.deprecated = false; } - 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.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); } - 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. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - UninterpretedOption.NamePart = (function() { + return EnumOptions; + })(); - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + protobuf.EnumValueOptions = (function() { - /** - * 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]]; - } + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * 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]]; + } - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = 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); - }; + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * 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; - }; + /** + * 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 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(); - }; + /** + * 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; + }; - /** - * 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(); - }; + /** + * 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 a SourceCodeInfo message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @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.SourceCodeInfo} SourceCodeInfo + * @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 */ - SourceCodeInfo.decode = function decode(reader, length) { + 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.SourceCodeInfo(); + 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: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + 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); @@ -7920,467 +7025,415 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @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 */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @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 */ - SourceCodeInfo.verify = function verify(message) { + EnumValueOptions.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 (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 "location." + error; + return "uninterpretedOption." + error; } } return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) 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]); + 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 a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + EnumValueOptions.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); + 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 SourceCodeInfo to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SourceCodeInfo.Location = (function() { + return EnumValueOptions; + })(); - /** - * 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 - */ + protobuf.ServiceOptions = (function() { - /** - * 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]]; - } + /** + * 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 + */ - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * 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]]; + } - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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; - } + /** + * 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; - }; + } + 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()); - }; + /** + * 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 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"; + /** + * 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; } - return null; - }; + } + 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 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]); + /** + * 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]); } - return message; - }; + } + 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 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); - }; + /** + * 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; + }; - return Location; - })(); + /** + * 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 SourceCodeInfo; + return ServiceOptions; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + 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) @@ -8388,78 +7441,133 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + MethodOptions.prototype.deprecated = false; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + MethodOptions.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(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decode = function decode(reader, length) { + 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.GeneratedCodeInfo(); + 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 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); break; default: reader.skipType(tag & 7); @@ -8470,466 +7578,375 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.verify = function verify(message) { + MethodOptions.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; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; } return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.MethodOptions} MethodOptions */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) 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]); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + MethodOptions.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); + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { + /** + * 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; + })(); - /** - * 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 - */ + return MethodOptions; + })(); - /** - * 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]]; - } + protobuf.UninterpretedOption = (function() { - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + /** + * 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 + */ - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + /** + * 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]]; + } - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * 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); - }; + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * 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; - })(); + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - protobuf.Empty = (function() { + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - 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]]; - } + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a new Empty instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - Empty.create = function create(properties) { - return new Empty(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @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.Empty} Empty + * @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 */ - Empty.decode = function decode(reader, length) { + 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.Empty(); + 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; @@ -8939,95 +7956,422 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @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 */ - Empty.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.Empty + * @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 */ - Empty.verify = function verify(message) { + 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 Empty message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - return new $root.google.protobuf.Empty(); + 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 Empty message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + 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 Empty to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; - })(); + UninterpretedOption.NamePart = (function() { - protobuf.FieldMask = (function() { + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + /** + * 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]]; + } - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + /** + * 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.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9035,78 +8379,78 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + SourceCodeInfo.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]); + 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 FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @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.FieldMask} FieldMask + * @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 */ - FieldMask.decode = function decode(reader, length) { + 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.FieldMask(); + 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.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + 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); @@ -9117,271 +8461,4407 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @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 */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.FieldMask + * @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 */ - FieldMask.verify = function verify(message) { + SourceCodeInfo.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"; + 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) 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]); + 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 FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + SourceCodeInfo.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]; + 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 FieldMask to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; - })(); - - return protobuf; - })(); + SourceCodeInfo.Location = (function() { - google.monitoring = (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 + */ - /** - * Namespace monitoring. - * @memberof google - * @namespace - */ - var monitoring = {}; + /** + * 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]]; + } - monitoring.dashboard = (function() { + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * Namespace dashboard. - * @memberof google.monitoring - * @namespace - */ - var dashboard = {}; + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - dashboard.v1 = (function() { + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; /** - * Namespace v1. - * @memberof google.monitoring.dashboard - * @namespace + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance */ - var v1 = {}; + Location.prototype.trailingComments = ""; - v1.Aggregation = (function() { + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * Properties of an Aggregation. - * @memberof google.monitoring.dashboard.v1 - * @interface IAggregation - * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod - * @property {google.monitoring.dashboard.v1.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner - * @property {google.monitoring.dashboard.v1.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer - * @property {Array.|null} [groupByFields] Aggregation groupByFields - */ + /** + * 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); + }; - /** - * Constructs a new Aggregation. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents an Aggregation. - * @implements IAggregation - * @constructor - * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set - */ - function Aggregation(properties) { - this.groupByFields = []; - if (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 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; + }; - /** - * Aggregation alignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod - * @memberof google.monitoring.dashboard.v1.Aggregation - * @instance - */ - Aggregation.prototype.alignmentPeriod = null; - - /** - * Aggregation perSeriesAligner. - * @member {google.monitoring.dashboard.v1.Aggregation.Aligner} perSeriesAligner - * @memberof google.monitoring.dashboard.v1.Aggregation - * @instance + /** + * 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.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; + })(); + + return protobuf; + })(); + + google.monitoring = (function() { + + /** + * Namespace monitoring. + * @memberof google + * @namespace + */ + var monitoring = {}; + + monitoring.dashboard = (function() { + + /** + * Namespace dashboard. + * @memberof google.monitoring + * @namespace + */ + var dashboard = {}; + + dashboard.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.monitoring.dashboard + * @namespace + */ + var v1 = {}; + + v1.Aggregation = (function() { + + /** + * Properties of an Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @interface IAggregation + * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod + * @property {google.monitoring.dashboard.v1.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner + * @property {google.monitoring.dashboard.v1.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer + * @property {Array.|null} [groupByFields] Aggregation groupByFields + */ + + /** + * Constructs a new Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + this.groupByFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aggregation alignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.alignmentPeriod = null; + + /** + * Aggregation perSeriesAligner. + * @member {google.monitoring.dashboard.v1.Aggregation.Aligner} perSeriesAligner + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.perSeriesAligner = 0; + + /** + * Aggregation crossSeriesReducer. + * @member {google.monitoring.dashboard.v1.Aggregation.Reducer} crossSeriesReducer + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.crossSeriesReducer = 0; + + /** + * Aggregation groupByFields. + * @member {Array.} groupByFields + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.groupByFields = $util.emptyArray; + + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) + $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); + if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); + if (message.groupByFields != null && message.groupByFields.length) + for (var i = 0; i < message.groupByFields.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + return writer; + }; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.perSeriesAligner = reader.int32(); + break; + case 4: + message.crossSeriesReducer = reader.int32(); + break; + case 5: + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); + if (error) + return "alignmentPeriod." + error; + } + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + switch (message.perSeriesAligner) { + default: + return "perSeriesAligner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 24: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + break; + } + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + switch (message.crossSeriesReducer) { + default: + return "crossSeriesReducer: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { + if (!Array.isArray(message.groupByFields)) + return "groupByFields: array expected"; + for (var i = 0; i < message.groupByFields.length; ++i) + if (!$util.isString(message.groupByFields[i])) + return "groupByFields: string[] expected"; + } + return null; + }; + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Aggregation) + return object; + var message = new $root.google.monitoring.dashboard.v1.Aggregation(); + if (object.alignmentPeriod != null) { + if (typeof object.alignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.alignmentPeriod: object expected"); + message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + } + switch (object.perSeriesAligner) { + case "ALIGN_NONE": + case 0: + message.perSeriesAligner = 0; + break; + case "ALIGN_DELTA": + case 1: + message.perSeriesAligner = 1; + break; + case "ALIGN_RATE": + case 2: + message.perSeriesAligner = 2; + break; + case "ALIGN_INTERPOLATE": + case 3: + message.perSeriesAligner = 3; + break; + case "ALIGN_NEXT_OLDER": + case 4: + message.perSeriesAligner = 4; + break; + case "ALIGN_MIN": + case 10: + message.perSeriesAligner = 10; + break; + case "ALIGN_MAX": + case 11: + message.perSeriesAligner = 11; + break; + case "ALIGN_MEAN": + case 12: + message.perSeriesAligner = 12; + break; + case "ALIGN_COUNT": + case 13: + message.perSeriesAligner = 13; + break; + case "ALIGN_SUM": + case 14: + message.perSeriesAligner = 14; + break; + case "ALIGN_STDDEV": + case 15: + message.perSeriesAligner = 15; + break; + case "ALIGN_COUNT_TRUE": + case 16: + message.perSeriesAligner = 16; + break; + case "ALIGN_COUNT_FALSE": + case 24: + message.perSeriesAligner = 24; + break; + case "ALIGN_FRACTION_TRUE": + case 17: + message.perSeriesAligner = 17; + break; + case "ALIGN_PERCENTILE_99": + case 18: + message.perSeriesAligner = 18; + break; + case "ALIGN_PERCENTILE_95": + case 19: + message.perSeriesAligner = 19; + break; + case "ALIGN_PERCENTILE_50": + case 20: + message.perSeriesAligner = 20; + break; + case "ALIGN_PERCENTILE_05": + case 21: + message.perSeriesAligner = 21; + break; + case "ALIGN_PERCENT_CHANGE": + case 23: + message.perSeriesAligner = 23; + break; + } + switch (object.crossSeriesReducer) { + case "REDUCE_NONE": + case 0: + message.crossSeriesReducer = 0; + break; + case "REDUCE_MEAN": + case 1: + message.crossSeriesReducer = 1; + break; + case "REDUCE_MIN": + case 2: + message.crossSeriesReducer = 2; + break; + case "REDUCE_MAX": + case 3: + message.crossSeriesReducer = 3; + break; + case "REDUCE_SUM": + case 4: + message.crossSeriesReducer = 4; + break; + case "REDUCE_STDDEV": + case 5: + message.crossSeriesReducer = 5; + break; + case "REDUCE_COUNT": + case 6: + message.crossSeriesReducer = 6; + break; + case "REDUCE_COUNT_TRUE": + case 7: + message.crossSeriesReducer = 7; + break; + case "REDUCE_COUNT_FALSE": + case 15: + message.crossSeriesReducer = 15; + break; + case "REDUCE_FRACTION_TRUE": + case 8: + message.crossSeriesReducer = 8; + break; + case "REDUCE_PERCENTILE_99": + case 9: + message.crossSeriesReducer = 9; + break; + case "REDUCE_PERCENTILE_95": + case 10: + message.crossSeriesReducer = 10; + break; + case "REDUCE_PERCENTILE_50": + case 11: + message.crossSeriesReducer = 11; + break; + case "REDUCE_PERCENTILE_05": + case 12: + message.crossSeriesReducer = 12; + break; + } + if (object.groupByFields) { + if (!Array.isArray(object.groupByFields)) + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.groupByFields: array expected"); + message.groupByFields = []; + for (var i = 0; i < object.groupByFields.length; ++i) + message.groupByFields[i] = String(object.groupByFields[i]); + } + return message; + }; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupByFields = []; + if (options.defaults) { + object.alignmentPeriod = null; + object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; + object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + } + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + if (message.groupByFields && message.groupByFields.length) { + object.groupByFields = []; + for (var j = 0; j < message.groupByFields.length; ++j) + object.groupByFields[j] = message.groupByFields[j]; + } + return object; + }; + + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Aligner enum. + * @name google.monitoring.dashboard.v1.Aggregation.Aligner + * @enum {number} + * @property {number} ALIGN_NONE=0 ALIGN_NONE value + * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value + * @property {number} ALIGN_RATE=2 ALIGN_RATE value + * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value + * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value + * @property {number} ALIGN_MIN=10 ALIGN_MIN value + * @property {number} ALIGN_MAX=11 ALIGN_MAX value + * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value + * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value + * @property {number} ALIGN_SUM=14 ALIGN_SUM value + * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value + * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value + * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value + * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value + * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value + * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value + * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value + * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value + * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value + */ + Aggregation.Aligner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALIGN_NONE"] = 0; + values[valuesById[1] = "ALIGN_DELTA"] = 1; + values[valuesById[2] = "ALIGN_RATE"] = 2; + values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; + values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; + values[valuesById[10] = "ALIGN_MIN"] = 10; + values[valuesById[11] = "ALIGN_MAX"] = 11; + values[valuesById[12] = "ALIGN_MEAN"] = 12; + values[valuesById[13] = "ALIGN_COUNT"] = 13; + values[valuesById[14] = "ALIGN_SUM"] = 14; + values[valuesById[15] = "ALIGN_STDDEV"] = 15; + values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; + values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; + values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; + values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; + values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; + values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; + values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; + values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; + return values; + })(); + + /** + * Reducer enum. + * @name google.monitoring.dashboard.v1.Aggregation.Reducer + * @enum {number} + * @property {number} REDUCE_NONE=0 REDUCE_NONE value + * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value + * @property {number} REDUCE_MIN=2 REDUCE_MIN value + * @property {number} REDUCE_MAX=3 REDUCE_MAX value + * @property {number} REDUCE_SUM=4 REDUCE_SUM value + * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value + * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value + * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value + * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value + * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value + * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value + * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value + * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value + * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value + */ + Aggregation.Reducer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDUCE_NONE"] = 0; + values[valuesById[1] = "REDUCE_MEAN"] = 1; + values[valuesById[2] = "REDUCE_MIN"] = 2; + values[valuesById[3] = "REDUCE_MAX"] = 3; + values[valuesById[4] = "REDUCE_SUM"] = 4; + values[valuesById[5] = "REDUCE_STDDEV"] = 5; + values[valuesById[6] = "REDUCE_COUNT"] = 6; + values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; + values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; + values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; + values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; + values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; + values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; + values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; + return values; + })(); + + return Aggregation; + })(); + + v1.PickTimeSeriesFilter = (function() { + + /** + * Properties of a PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IPickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null} [rankingMethod] PickTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] PickTimeSeriesFilter numTimeSeries + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null} [direction] PickTimeSeriesFilter direction + */ + + /** + * Constructs a new PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a PickTimeSeriesFilter. + * @implements IPickTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + */ + function PickTimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PickTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.rankingMethod = 0; + + /** + * PickTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.numTimeSeries = 0; + + /** + * PickTimeSeriesFilter direction. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction} direction + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.direction = 0; + + /** + * Creates a new PickTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter instance + */ + PickTimeSeriesFilter.create = function create(properties) { + return new PickTimeSeriesFilter(properties); + }; + + /** + * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); + return writer; + }; + + /** + * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + case 3: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PickTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + */ + PickTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_MEAN": + case 1: + message.rankingMethod = 1; + break; + case "METHOD_MAX": + case 2: + message.rankingMethod = 2; + break; + case "METHOD_MIN": + case 3: + message.rankingMethod = 3; + break; + case "METHOD_SUM": + case 4: + message.rankingMethod = 4; + break; + case "METHOD_LATEST": + case 5: + message.rankingMethod = 5; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "TOP": + case 1: + message.direction = 1; + break; + case "BOTTOM": + case 2: + message.direction = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.PickTimeSeriesFilter} message PickTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction[message.direction] : message.direction; + return object; + }; + + /** + * Converts this PickTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + PickTimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Method enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method + * @enum {number} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_MEAN=1 METHOD_MEAN value + * @property {number} METHOD_MAX=2 METHOD_MAX value + * @property {number} METHOD_MIN=3 METHOD_MIN value + * @property {number} METHOD_SUM=4 METHOD_SUM value + * @property {number} METHOD_LATEST=5 METHOD_LATEST value + */ + PickTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_MEAN"] = 1; + values[valuesById[2] = "METHOD_MAX"] = 2; + values[valuesById[3] = "METHOD_MIN"] = 3; + values[valuesById[4] = "METHOD_SUM"] = 4; + values[valuesById[5] = "METHOD_LATEST"] = 5; + return values; + })(); + + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction + * @enum {number} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} BOTTOM=2 BOTTOM value + */ + PickTimeSeriesFilter.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "BOTTOM"] = 2; + return values; + })(); + + return PickTimeSeriesFilter; + })(); + + v1.StatisticalTimeSeriesFilter = (function() { + + /** + * Properties of a StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IStatisticalTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null} [rankingMethod] StatisticalTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] StatisticalTimeSeriesFilter numTimeSeries + */ + + /** + * Constructs a new StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a StatisticalTimeSeriesFilter. + * @implements IStatisticalTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + */ + function StatisticalTimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatisticalTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.rankingMethod = 0; + + /** + * StatisticalTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.numTimeSeries = 0; + + /** + * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter instance + */ + StatisticalTimeSeriesFilter.create = function create(properties) { + return new StatisticalTimeSeriesFilter(properties); + }; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + return writer; + }; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatisticalTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticalTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer expected"; + return null; + }; + + /** + * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + */ + StatisticalTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_CLUSTER_OUTLIER": + case 1: + message.rankingMethod = 1; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + return message; + }; + + /** + * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticalTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + return object; + }; + + /** + * Converts this StatisticalTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + StatisticalTimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Method enum. + * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method + * @enum {number} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value + */ + StatisticalTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_CLUSTER_OUTLIER"] = 1; + return values; + })(); + + return StatisticalTimeSeriesFilter; + })(); + + v1.Dashboard = (function() { + + /** + * Properties of a Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @interface IDashboard + * @property {string|null} [name] Dashboard name + * @property {string|null} [displayName] Dashboard displayName + * @property {string|null} [etag] Dashboard etag + * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout + * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout + * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + */ + + /** + * Constructs a new Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Dashboard. + * @implements IDashboard + * @constructor + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + */ + function Dashboard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dashboard name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.name = ""; + + /** + * Dashboard displayName. + * @member {string} displayName + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.displayName = ""; + + /** + * Dashboard etag. + * @member {string} etag + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.etag = ""; + + /** + * Dashboard gridLayout. + * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.gridLayout = null; + + /** + * Dashboard rowLayout. + * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.rowLayout = null; + + /** + * Dashboard columnLayout. + * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.columnLayout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dashboard layout. + * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Object.defineProperty(Dashboard.prototype, "layout", { + get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dashboard instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance + */ + Dashboard.create = function create(properties) { + return new Dashboard(properties); + }; + + /** + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) + $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) + $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) + $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dashboard message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + case 5: + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); + break; + case 8: + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); + break; + case 9: + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dashboard message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dashboard.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); + if (error) + return "gridLayout." + error; + } + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); + if (error) + return "rowLayout." + error; + } + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); + if (error) + return "columnLayout." + error; + } + } + return null; + }; + + /** + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + */ + Dashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) + return object; + var message = new $root.google.monitoring.dashboard.v1.Dashboard(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.etag != null) + message.etag = String(object.etag); + if (object.gridLayout != null) { + if (typeof object.gridLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); + } + if (object.rowLayout != null) { + if (typeof object.rowLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); + } + if (object.columnLayout != null) { + if (typeof object.columnLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); + } + return message; + }; + + /** + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dashboard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); + if (options.oneofs) + object.layout = "gridLayout"; + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); + if (options.oneofs) + object.layout = "rowLayout"; + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); + if (options.oneofs) + object.layout = "columnLayout"; + } + return object; + }; + + /** + * Converts this Dashboard to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + * @returns {Object.} JSON object + */ + Dashboard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Dashboard; + })(); + + v1.GridLayout = (function() { + + /** + * Properties of a GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets + */ + + /** + * Constructs a new GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GridLayout. + * @implements IGridLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + */ + function GridLayout(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.widgets = $util.emptyArray; + + /** + * Creates a new GridLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + */ + GridLayout.create = function create(properties) { + return new GridLayout(properties); + }; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GridLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GridLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + */ + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + else if (typeof object.columns === "string") + message.columns = parseInt(object.columns, 10); + else if (typeof object.columns === "number") + message.columns = object.columns; + else if (typeof object.columns === "object") + message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GridLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.columns = options.longs === String ? "0" : 0; + if (message.columns != null && message.hasOwnProperty("columns")) + if (typeof message.columns === "number") + object.columns = options.longs === String ? String(message.columns) : message.columns; + else + object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this GridLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + * @returns {Object.} JSON object + */ + GridLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GridLayout; + })(); + + v1.RowLayout = (function() { + + /** + * Properties of a RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IRowLayout + * @property {Array.|null} [rows] RowLayout rows + */ + + /** + * Constructs a new RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a RowLayout. + * @implements IRowLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + */ + function RowLayout(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowLayout rows. + * @member {Array.} rows + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + */ + RowLayout.prototype.rows = $util.emptyArray; + + /** + * Creates a new RowLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + */ + RowLayout.create = function create(properties) { + return new RowLayout(properties); + }; + + /** + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RowLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + */ + RowLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); + message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this RowLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + * @returns {Object.} JSON object + */ + RowLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RowLayout.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @interface IRow + * @property {number|Long|null} [weight] Row weight + * @property {Array.|null} [widgets] Row widgets + */ + + /** + * Constructs a new Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Row widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.widgets = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Row; + })(); + + return RowLayout; + })(); + + v1.ColumnLayout = (function() { + + /** + * Properties of a ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IColumnLayout + * @property {Array.|null} [columns] ColumnLayout columns + */ + + /** + * Constructs a new ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ColumnLayout. + * @implements IColumnLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + */ + function ColumnLayout(properties) { + this.columns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnLayout columns. + * @member {Array.} columns + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + */ + ColumnLayout.prototype.columns = $util.emptyArray; + + /** + * Creates a new ColumnLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance + */ + ColumnLayout.create = function create(properties) { + return new ColumnLayout(properties); + }; + + /** + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + */ + ColumnLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); + message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); + } + return object; + }; + + /** + * Converts this ColumnLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + * @returns {Object.} JSON object + */ + ColumnLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ColumnLayout.Column = (function() { + + /** + * Properties of a Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @interface IColumn + * @property {number|Long|null} [weight] Column weight + * @property {Array.|null} [widgets] Column widgets + */ + + /** + * Constructs a new Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + */ + function Column(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Column weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Column widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.widgets = $util.emptyArray; + + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Column message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + */ + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; + + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Column; + })(); + + return ColumnLayout; + })(); + + v1.Widget = (function() { + + /** + * Properties of a Widget. + * @memberof google.monitoring.dashboard.v1 + * @interface IWidget + * @property {string|null} [title] Widget title + * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart + * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard + * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text + * @property {google.protobuf.IEmpty|null} [blank] Widget blank + */ + + /** + * Constructs a new Widget. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Widget. + * @implements IWidget + * @constructor + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + */ + function Widget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Widget title. + * @member {string} title + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.title = ""; + + /** + * Widget xyChart. + * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.xyChart = null; + + /** + * Widget scorecard. + * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.scorecard = null; + + /** + * Widget text. + * @member {google.monitoring.dashboard.v1.IText|null|undefined} text + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.text = null; + + /** + * Widget blank. + * @member {google.protobuf.IEmpty|null|undefined} blank + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.blank = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Widget content. + * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Object.defineProperty(Widget.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Widget instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Widget} Widget instance + */ + Widget.create = function create(properties) { + return new Widget(properties); + }; + + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.xyChart != null && Object.hasOwnProperty.call(message, "xyChart")) + $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.scorecard != null && Object.hasOwnProperty.call(message, "scorecard")) + $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.blank != null && Object.hasOwnProperty.call(message, "blank")) + $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Widget message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + break; + case 3: + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); + break; + case 4: + message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); + break; + case 5: + message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Widget message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Widget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); + if (error) + return "xyChart." + error; + } + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); + if (error) + return "scorecard." + error; + } + } + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.blank != null && message.hasOwnProperty("blank")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.protobuf.Empty.verify(message.blank); + if (error) + return "blank." + error; + } + } + return null; + }; + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Widget} Widget + */ + Widget.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Widget) + return object; + var message = new $root.google.monitoring.dashboard.v1.Widget(); + if (object.title != null) + message.title = String(object.title); + if (object.xyChart != null) { + if (typeof object.xyChart !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); + } + if (object.scorecard != null) { + if (typeof object.scorecard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); + } + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); + message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); + } + if (object.blank != null) { + if (typeof object.blank !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); + message.blank = $root.google.protobuf.Empty.fromObject(object.blank); + } + return message; + }; + + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.Widget} message Widget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Aggregation.prototype.perSeriesAligner = 0; + Widget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); + if (options.oneofs) + object.content = "xyChart"; + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); + if (options.oneofs) + object.content = "scorecard"; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); + if (options.oneofs) + object.content = "text"; + } + if (message.blank != null && message.hasOwnProperty("blank")) { + object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); + if (options.oneofs) + object.content = "blank"; + } + return object; + }; /** - * Aggregation crossSeriesReducer. - * @member {google.monitoring.dashboard.v1.Aggregation.Reducer} crossSeriesReducer - * @memberof google.monitoring.dashboard.v1.Aggregation + * Converts this Widget to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Widget * @instance + * @returns {Object.} JSON object */ - Aggregation.prototype.crossSeriesReducer = 0; + Widget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Widget; + })(); + + v1.Scorecard = (function() { /** - * Aggregation groupByFields. - * @member {Array.} groupByFields - * @memberof google.monitoring.dashboard.v1.Aggregation + * Properties of a Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @interface IScorecard + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery + * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView + * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView + * @property {Array.|null} [thresholds] Scorecard thresholds + */ + + /** + * Constructs a new Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Scorecard. + * @implements IScorecard + * @constructor + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + */ + function Scorecard(properties) { + this.thresholds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scorecard timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance */ - Aggregation.prototype.groupByFields = $util.emptyArray; + Scorecard.prototype.timeSeriesQuery = null; /** - * Creates a new Aggregation instance using the specified properties. + * Scorecard gaugeView. + * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.gaugeView = null; + + /** + * Scorecard sparkChartView. + * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.sparkChartView = null; + + /** + * Scorecard thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.thresholds = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scorecard dataView. + * @member {"gaugeView"|"sparkChartView"|undefined} dataView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Object.defineProperty(Scorecard.prototype, "dataView", { + get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scorecard instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation instance + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance */ - Aggregation.create = function create(properties) { - return new Aggregation(properties); + Scorecard.create = function create(properties) { + return new Scorecard(properties); }; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encode = function encode(message, writer) { + Scorecard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) - $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); - if (message.groupByFields != null && message.groupByFields.length) - for (var i = 0; i < message.groupByFields.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gaugeView != null && Object.hasOwnProperty.call(message, "gaugeView")) + $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sparkChartView != null && Object.hasOwnProperty.call(message, "sparkChartView")) + $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + Scorecard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a Scorecard message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decode = function decode(reader, length) { + Scorecard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Aggregation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 2: - message.perSeriesAligner = reader.int32(); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); break; case 4: - message.crossSeriesReducer = reader.int32(); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); break; case 5: - if (!(message.groupByFields && message.groupByFields.length)) - message.groupByFields = []; - message.groupByFields.push(reader.string()); + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -9392,970 +12872,623 @@ }; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a Scorecard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decodeDelimited = function decodeDelimited(reader) { + Scorecard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Aggregation message. + * Verifies a Scorecard message. * @function verify - * @memberof google.monitoring.dashboard.v1.Aggregation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aggregation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); - if (error) - return "alignmentPeriod." + error; - } - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - switch (message.perSeriesAligner) { - default: - return "perSeriesAligner: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 24: - case 17: - case 18: - case 19: - case 20: - case 21: - case 23: - break; + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scorecard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); + if (error) + return "gaugeView." + error; } - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - switch (message.crossSeriesReducer) { - default: - return "crossSeriesReducer: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 15: - case 8: - case 9: - case 10: - case 11: - case 12: - break; + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + if (properties.dataView === 1) + return "dataView: multiple values"; + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); + if (error) + return "sparkChartView." + error; + } + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; } - if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { - if (!Array.isArray(message.groupByFields)) - return "groupByFields: array expected"; - for (var i = 0; i < message.groupByFields.length; ++i) - if (!$util.isString(message.groupByFields[i])) - return "groupByFields: string[] expected"; } return null; }; /** - * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard */ - Aggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Aggregation) + Scorecard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) return object; - var message = new $root.google.monitoring.dashboard.v1.Aggregation(); - if (object.alignmentPeriod != null) { - if (typeof object.alignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Aggregation.alignmentPeriod: object expected"); - message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + var message = new $root.google.monitoring.dashboard.v1.Scorecard(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); } - switch (object.perSeriesAligner) { - case "ALIGN_NONE": - case 0: - message.perSeriesAligner = 0; - break; - case "ALIGN_DELTA": - case 1: - message.perSeriesAligner = 1; - break; - case "ALIGN_RATE": - case 2: - message.perSeriesAligner = 2; - break; - case "ALIGN_INTERPOLATE": - case 3: - message.perSeriesAligner = 3; - break; - case "ALIGN_NEXT_OLDER": - case 4: - message.perSeriesAligner = 4; - break; - case "ALIGN_MIN": - case 10: - message.perSeriesAligner = 10; - break; - case "ALIGN_MAX": - case 11: - message.perSeriesAligner = 11; - break; - case "ALIGN_MEAN": - case 12: - message.perSeriesAligner = 12; - break; - case "ALIGN_COUNT": - case 13: - message.perSeriesAligner = 13; - break; - case "ALIGN_SUM": - case 14: - message.perSeriesAligner = 14; - break; - case "ALIGN_STDDEV": - case 15: - message.perSeriesAligner = 15; - break; - case "ALIGN_COUNT_TRUE": - case 16: - message.perSeriesAligner = 16; - break; - case "ALIGN_COUNT_FALSE": - case 24: - message.perSeriesAligner = 24; - break; - case "ALIGN_FRACTION_TRUE": - case 17: - message.perSeriesAligner = 17; - break; - case "ALIGN_PERCENTILE_99": - case 18: - message.perSeriesAligner = 18; - break; - case "ALIGN_PERCENTILE_95": - case 19: - message.perSeriesAligner = 19; - break; - case "ALIGN_PERCENTILE_50": - case 20: - message.perSeriesAligner = 20; - break; - case "ALIGN_PERCENTILE_05": - case 21: - message.perSeriesAligner = 21; - break; - case "ALIGN_PERCENT_CHANGE": - case 23: - message.perSeriesAligner = 23; - break; + if (object.gaugeView != null) { + if (typeof object.gaugeView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); } - switch (object.crossSeriesReducer) { - case "REDUCE_NONE": - case 0: - message.crossSeriesReducer = 0; - break; - case "REDUCE_MEAN": - case 1: - message.crossSeriesReducer = 1; - break; - case "REDUCE_MIN": - case 2: - message.crossSeriesReducer = 2; - break; - case "REDUCE_MAX": - case 3: - message.crossSeriesReducer = 3; - break; - case "REDUCE_SUM": - case 4: - message.crossSeriesReducer = 4; - break; - case "REDUCE_STDDEV": - case 5: - message.crossSeriesReducer = 5; - break; - case "REDUCE_COUNT": - case 6: - message.crossSeriesReducer = 6; - break; - case "REDUCE_COUNT_TRUE": - case 7: - message.crossSeriesReducer = 7; - break; - case "REDUCE_COUNT_FALSE": - case 15: - message.crossSeriesReducer = 15; - break; - case "REDUCE_FRACTION_TRUE": - case 8: - message.crossSeriesReducer = 8; - break; - case "REDUCE_PERCENTILE_99": - case 9: - message.crossSeriesReducer = 9; - break; - case "REDUCE_PERCENTILE_95": - case 10: - message.crossSeriesReducer = 10; - break; - case "REDUCE_PERCENTILE_50": - case 11: - message.crossSeriesReducer = 11; - break; - case "REDUCE_PERCENTILE_05": - case 12: - message.crossSeriesReducer = 12; - break; + if (object.sparkChartView != null) { + if (typeof object.sparkChartView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); } - if (object.groupByFields) { - if (!Array.isArray(object.groupByFields)) - throw TypeError(".google.monitoring.dashboard.v1.Aggregation.groupByFields: array expected"); - message.groupByFields = []; - for (var i = 0; i < object.groupByFields.length; ++i) - message.groupByFields[i] = String(object.groupByFields[i]); + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } } return message; }; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @static - * @param {google.monitoring.dashboard.v1.Aggregation} message Aggregation + * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregation.toObject = function toObject(message, options) { + Scorecard.toObject = function toObject(message, options) { if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groupByFields = []; - if (options.defaults) { - object.alignmentPeriod = null; - object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; - object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.thresholds = []; + if (options.defaults) + object.timeSeriesQuery = null; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); + if (options.oneofs) + object.dataView = "gaugeView"; } - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) - object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - object.perSeriesAligner = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; - if (message.groupByFields && message.groupByFields.length) { - object.groupByFields = []; - for (var j = 0; j < message.groupByFields.length; ++j) - object.groupByFields[j] = message.groupByFields[j]; + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); + if (options.oneofs) + object.dataView = "sparkChartView"; + } + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); } return object; }; /** - * Converts this Aggregation to JSON. + * Converts this Scorecard to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.Scorecard * @instance * @returns {Object.} JSON object */ - Aggregation.prototype.toJSON = function toJSON() { + Scorecard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Aligner enum. - * @name google.monitoring.dashboard.v1.Aggregation.Aligner - * @enum {number} - * @property {number} ALIGN_NONE=0 ALIGN_NONE value - * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value - * @property {number} ALIGN_RATE=2 ALIGN_RATE value - * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value - * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value - * @property {number} ALIGN_MIN=10 ALIGN_MIN value - * @property {number} ALIGN_MAX=11 ALIGN_MAX value - * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value - * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value - * @property {number} ALIGN_SUM=14 ALIGN_SUM value - * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value - * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value - * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value - * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value - * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value - * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value - * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value - * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value - * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value - */ - Aggregation.Aligner = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ALIGN_NONE"] = 0; - values[valuesById[1] = "ALIGN_DELTA"] = 1; - values[valuesById[2] = "ALIGN_RATE"] = 2; - values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; - values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; - values[valuesById[10] = "ALIGN_MIN"] = 10; - values[valuesById[11] = "ALIGN_MAX"] = 11; - values[valuesById[12] = "ALIGN_MEAN"] = 12; - values[valuesById[13] = "ALIGN_COUNT"] = 13; - values[valuesById[14] = "ALIGN_SUM"] = 14; - values[valuesById[15] = "ALIGN_STDDEV"] = 15; - values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; - values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; - values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; - values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; - values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; - values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; - values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; - values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; - return values; - })(); - - /** - * Reducer enum. - * @name google.monitoring.dashboard.v1.Aggregation.Reducer - * @enum {number} - * @property {number} REDUCE_NONE=0 REDUCE_NONE value - * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value - * @property {number} REDUCE_MIN=2 REDUCE_MIN value - * @property {number} REDUCE_MAX=3 REDUCE_MAX value - * @property {number} REDUCE_SUM=4 REDUCE_SUM value - * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value - * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value - * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value - * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value - * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value - * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value - * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value - * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value - * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value - */ - Aggregation.Reducer = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDUCE_NONE"] = 0; - values[valuesById[1] = "REDUCE_MEAN"] = 1; - values[valuesById[2] = "REDUCE_MIN"] = 2; - values[valuesById[3] = "REDUCE_MAX"] = 3; - values[valuesById[4] = "REDUCE_SUM"] = 4; - values[valuesById[5] = "REDUCE_STDDEV"] = 5; - values[valuesById[6] = "REDUCE_COUNT"] = 6; - values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; - values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; - values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; - values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; - values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; - values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; - values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; - return values; - })(); - - return Aggregation; - })(); - - v1.PickTimeSeriesFilter = (function() { - - /** - * Properties of a PickTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @interface IPickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null} [rankingMethod] PickTimeSeriesFilter rankingMethod - * @property {number|null} [numTimeSeries] PickTimeSeriesFilter numTimeSeries - * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null} [direction] PickTimeSeriesFilter direction - */ + Scorecard.GaugeView = (function() { - /** - * Constructs a new PickTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a PickTimeSeriesFilter. - * @implements IPickTimeSeriesFilter - * @constructor - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set - */ - function PickTimeSeriesFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface IGaugeView + * @property {number|null} [lowerBound] GaugeView lowerBound + * @property {number|null} [upperBound] GaugeView upperBound + */ - /** - * PickTimeSeriesFilter rankingMethod. - * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method} rankingMethod - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance - */ - PickTimeSeriesFilter.prototype.rankingMethod = 0; + /** + * Constructs a new GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a GaugeView. + * @implements IGaugeView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + */ + function GaugeView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * PickTimeSeriesFilter numTimeSeries. - * @member {number} numTimeSeries - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance - */ - PickTimeSeriesFilter.prototype.numTimeSeries = 0; + /** + * GaugeView lowerBound. + * @member {number} lowerBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.lowerBound = 0; - /** - * PickTimeSeriesFilter direction. - * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction} direction - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance - */ - PickTimeSeriesFilter.prototype.direction = 0; + /** + * GaugeView upperBound. + * @member {number} upperBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.upperBound = 0; - /** - * Creates a new PickTimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter instance - */ - PickTimeSeriesFilter.create = function create(properties) { - return new PickTimeSeriesFilter(properties); - }; + /** + * Creates a new GaugeView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance + */ + GaugeView.create = function create(properties) { + return new GaugeView(properties); + }; - /** - * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PickTimeSeriesFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); - return writer; - }; + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); + return writer; + }; - /** - * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PickTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PickTimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rankingMethod = reader.int32(); - break; - case 2: - message.numTimeSeries = reader.int32(); - break; - case 3: - message.direction = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lowerBound = reader.double(); + break; + case 2: + message.upperBound = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PickTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a PickTimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PickTimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - switch (message.rankingMethod) { - default: - return "rankingMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - if (!$util.isInteger(message.numTimeSeries)) - return "numTimeSeries: integer expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - switch (message.direction) { - default: - return "direction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Verifies a GaugeView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GaugeView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; - /** - * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - */ - PickTimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter) - return object; - var message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); - switch (object.rankingMethod) { - case "METHOD_UNSPECIFIED": - case 0: - message.rankingMethod = 0; - break; - case "METHOD_MEAN": - case 1: - message.rankingMethod = 1; - break; - case "METHOD_MAX": - case 2: - message.rankingMethod = 2; - break; - case "METHOD_MIN": - case 3: - message.rankingMethod = 3; - break; - case "METHOD_SUM": - case 4: - message.rankingMethod = 4; - break; - case "METHOD_LATEST": - case 5: - message.rankingMethod = 5; - break; - } - if (object.numTimeSeries != null) - message.numTimeSeries = object.numTimeSeries | 0; - switch (object.direction) { - case "DIRECTION_UNSPECIFIED": - case 0: - message.direction = 0; - break; - case "TOP": - case 1: - message.direction = 1; - break; - case "BOTTOM": - case 2: - message.direction = 2; - break; - } - return message; - }; + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + */ + GaugeView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; - /** - * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.PickTimeSeriesFilter} message PickTimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PickTimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; - object.numTimeSeries = 0; - object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; - } - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - object.numTimeSeries = message.numTimeSeries; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction[message.direction] : message.direction; - return object; - }; + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GaugeView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; - /** - * Converts this PickTimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - PickTimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this GaugeView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + * @returns {Object.} JSON object + */ + GaugeView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Method enum. - * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method - * @enum {number} - * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value - * @property {number} METHOD_MEAN=1 METHOD_MEAN value - * @property {number} METHOD_MAX=2 METHOD_MAX value - * @property {number} METHOD_MIN=3 METHOD_MIN value - * @property {number} METHOD_SUM=4 METHOD_SUM value - * @property {number} METHOD_LATEST=5 METHOD_LATEST value - */ - PickTimeSeriesFilter.Method = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "METHOD_MEAN"] = 1; - values[valuesById[2] = "METHOD_MAX"] = 2; - values[valuesById[3] = "METHOD_MIN"] = 3; - values[valuesById[4] = "METHOD_SUM"] = 4; - values[valuesById[5] = "METHOD_LATEST"] = 5; - return values; + return GaugeView; })(); - /** - * Direction enum. - * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction - * @enum {number} - * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value - * @property {number} TOP=1 TOP value - * @property {number} BOTTOM=2 BOTTOM value - */ - PickTimeSeriesFilter.Direction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOP"] = 1; - values[valuesById[2] = "BOTTOM"] = 2; - return values; - })(); + Scorecard.SparkChartView = (function() { - return PickTimeSeriesFilter; - })(); + /** + * Properties of a SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface ISparkChartView + * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod + */ - v1.StatisticalTimeSeriesFilter = (function() { + /** + * Constructs a new SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a SparkChartView. + * @implements ISparkChartView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + */ + function SparkChartView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a StatisticalTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @interface IStatisticalTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null} [rankingMethod] StatisticalTimeSeriesFilter rankingMethod - * @property {number|null} [numTimeSeries] StatisticalTimeSeriesFilter numTimeSeries - */ + /** + * SparkChartView sparkChartType. + * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.sparkChartType = 0; - /** - * Constructs a new StatisticalTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a StatisticalTimeSeriesFilter. - * @implements IStatisticalTimeSeriesFilter - * @constructor - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set - */ - function StatisticalTimeSeriesFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * SparkChartView minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.minAlignmentPeriod = null; - /** - * StatisticalTimeSeriesFilter rankingMethod. - * @member {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method} rankingMethod - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - */ - StatisticalTimeSeriesFilter.prototype.rankingMethod = 0; + /** + * Creates a new SparkChartView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance + */ + SparkChartView.create = function create(properties) { + return new SparkChartView(properties); + }; - /** - * StatisticalTimeSeriesFilter numTimeSeries. - * @member {number} numTimeSeries - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - */ - StatisticalTimeSeriesFilter.prototype.numTimeSeries = 0; + /** + * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sparkChartType != null && Object.hasOwnProperty.call(message, "sparkChartType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter instance - */ - StatisticalTimeSeriesFilter.create = function create(properties) { - return new StatisticalTimeSeriesFilter(properties); - }; + /** + * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkChartView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sparkChartType = reader.int32(); + break; + case 2: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticalTimeSeriesFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); - return writer; - }; + /** + * Decodes a SparkChartView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticalTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a SparkChartView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkChartView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + switch (message.sparkChartType) { + default: + return "sparkChartType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; - /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticalTimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + */ + SparkChartView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + switch (object.sparkChartType) { + case "SPARK_CHART_TYPE_UNSPECIFIED": + case 0: + message.sparkChartType = 0; + break; + case "SPARK_LINE": case 1: - message.rankingMethod = reader.int32(); + message.sparkChartType = 1; break; + case "SPARK_BAR": case 2: - message.numTimeSeries = reader.int32(); - break; - default: - reader.skipType(tag & 7); + message.sparkChartType = 2; break; } - } - return message; - }; - - /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticalTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatisticalTimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatisticalTimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - switch (message.rankingMethod) { - default: - return "rankingMethod: enum value expected"; - case 0: - case 1: - break; + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); } - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - if (!$util.isInteger(message.numTimeSeries)) - return "numTimeSeries: integer expected"; - return null; - }; + return message; + }; - /** - * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - */ - StatisticalTimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter) + /** + * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkChartView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; + object.minAlignmentPeriod = null; + } + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); return object; - var message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); - switch (object.rankingMethod) { - case "METHOD_UNSPECIFIED": - case 0: - message.rankingMethod = 0; - break; - case "METHOD_CLUSTER_OUTLIER": - case 1: - message.rankingMethod = 1; - break; - } - if (object.numTimeSeries != null) - message.numTimeSeries = object.numTimeSeries | 0; - return message; - }; - - /** - * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatisticalTimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; - object.numTimeSeries = 0; - } - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - object.numTimeSeries = message.numTimeSeries; - return object; - }; + }; - /** - * Converts this StatisticalTimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - StatisticalTimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SparkChartView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + * @returns {Object.} JSON object + */ + SparkChartView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Method enum. - * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method - * @enum {number} - * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value - * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value - */ - StatisticalTimeSeriesFilter.Method = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "METHOD_CLUSTER_OUTLIER"] = 1; - return values; + return SparkChartView; })(); - return StatisticalTimeSeriesFilter; + return Scorecard; })(); - v1.Dashboard = (function() { + v1.TimeSeriesQuery = (function() { /** - * Properties of a Dashboard. + * Properties of a TimeSeriesQuery. * @memberof google.monitoring.dashboard.v1 - * @interface IDashboard - * @property {string|null} [name] Dashboard name - * @property {string|null} [displayName] Dashboard displayName - * @property {string|null} [etag] Dashboard etag - * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout - * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout - * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + * @interface ITimeSeriesQuery + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio + * @property {string|null} [timeSeriesQueryLanguage] TimeSeriesQuery timeSeriesQueryLanguage + * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride */ /** - * Constructs a new Dashboard. + * Constructs a new TimeSeriesQuery. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Dashboard. - * @implements IDashboard + * @classdesc Represents a TimeSeriesQuery. + * @implements ITimeSeriesQuery * @constructor - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set */ - function Dashboard(properties) { + function TimeSeriesQuery(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10363,154 +13496,128 @@ } /** - * Dashboard name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.name = ""; - - /** - * Dashboard displayName. - * @member {string} displayName - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.displayName = ""; - - /** - * Dashboard etag. - * @member {string} etag - * @memberof google.monitoring.dashboard.v1.Dashboard + * TimeSeriesQuery timeSeriesFilter. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - Dashboard.prototype.etag = ""; + TimeSeriesQuery.prototype.timeSeriesFilter = null; /** - * Dashboard gridLayout. - * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout - * @memberof google.monitoring.dashboard.v1.Dashboard + * TimeSeriesQuery timeSeriesFilterRatio. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - Dashboard.prototype.gridLayout = null; + TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; /** - * Dashboard rowLayout. - * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout - * @memberof google.monitoring.dashboard.v1.Dashboard + * TimeSeriesQuery timeSeriesQueryLanguage. + * @member {string} timeSeriesQueryLanguage + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - Dashboard.prototype.rowLayout = null; + TimeSeriesQuery.prototype.timeSeriesQueryLanguage = ""; /** - * Dashboard columnLayout. - * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout - * @memberof google.monitoring.dashboard.v1.Dashboard + * TimeSeriesQuery unitOverride. + * @member {string} unitOverride + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - Dashboard.prototype.columnLayout = null; + TimeSeriesQuery.prototype.unitOverride = ""; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Dashboard layout. - * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout - * @memberof google.monitoring.dashboard.v1.Dashboard + * TimeSeriesQuery source. + * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"|undefined} source + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - Object.defineProperty(Dashboard.prototype, "layout", { - get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), + Object.defineProperty(TimeSeriesQuery.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio", "timeSeriesQueryLanguage"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Dashboard instance using the specified properties. + * Creates a new TimeSeriesQuery instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance */ - Dashboard.create = function create(properties) { - return new Dashboard(properties); + TimeSeriesQuery.create = function create(properties) { + return new TimeSeriesQuery(properties); }; /** - * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dashboard.encode = function encode(message, writer) { + TimeSeriesQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) - $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) - $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) - $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.timeSeriesFilter != null && Object.hasOwnProperty.call(message, "timeSeriesFilter")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSeriesFilterRatio != null && Object.hasOwnProperty.call(message, "timeSeriesFilterRatio")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSeriesQueryLanguage != null && Object.hasOwnProperty.call(message, "timeSeriesQueryLanguage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.timeSeriesQueryLanguage); + if (message.unitOverride != null && Object.hasOwnProperty.call(message, "unitOverride")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); return writer; }; /** - * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dashboard.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Dashboard message from the specified reader or buffer. + * Decodes a TimeSeriesQuery message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dashboard.decode = function decode(reader, length) { + TimeSeriesQuery.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); break; case 2: - message.displayName = reader.string(); + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); break; - case 4: - message.etag = reader.string(); + case 3: + message.timeSeriesQueryLanguage = reader.string(); break; case 5: - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); - break; - case 8: - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); - break; - case 9: - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + message.unitOverride = reader.string(); break; default: reader.skipType(tag & 7); @@ -10521,185 +13628,164 @@ }; /** - * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dashboard.decodeDelimited = function decodeDelimited(reader) { + TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Dashboard message. + * Verifies a TimeSeriesQuery message. * @function verify - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Dashboard.verify = function verify(message) { + TimeSeriesQuery.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - properties.layout = 1; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + properties.source = 1; { - var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); if (error) - return "gridLayout." + error; + return "timeSeriesFilter." + error; } } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; { - var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); if (error) - return "rowLayout." + error; + return "timeSeriesFilterRatio." + error; } } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); - if (error) - return "columnLayout." + error; - } + if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.timeSeriesQueryLanguage)) + return "timeSeriesQueryLanguage: string expected"; } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + if (!$util.isString(message.unitOverride)) + return "unitOverride: string expected"; return null; }; /** - * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard - */ - Dashboard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) - return object; - var message = new $root.google.monitoring.dashboard.v1.Dashboard(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.etag != null) - message.etag = String(object.etag); - if (object.gridLayout != null) { - if (typeof object.gridLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); - } - if (object.rowLayout != null) { - if (typeof object.rowLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + */ + TimeSeriesQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + if (object.timeSeriesFilter != null) { + if (typeof object.timeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); } - if (object.columnLayout != null) { - if (typeof object.columnLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); + if (object.timeSeriesFilterRatio != null) { + if (typeof object.timeSeriesFilterRatio !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); } + if (object.timeSeriesQueryLanguage != null) + message.timeSeriesQueryLanguage = String(object.timeSeriesQueryLanguage); + if (object.unitOverride != null) + message.unitOverride = String(object.unitOverride); return message; }; /** - * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @static - * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard + * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dashboard.toObject = function toObject(message, options) { + TimeSeriesQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); + if (options.defaults) + object.unitOverride = ""; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); if (options.oneofs) - object.layout = "gridLayout"; + object.source = "timeSeriesFilter"; } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); if (options.oneofs) - object.layout = "rowLayout"; + object.source = "timeSeriesFilterRatio"; } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); + if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { + object.timeSeriesQueryLanguage = message.timeSeriesQueryLanguage; if (options.oneofs) - object.layout = "columnLayout"; + object.source = "timeSeriesQueryLanguage"; } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + object.unitOverride = message.unitOverride; return object; }; /** - * Converts this Dashboard to JSON. + * Converts this TimeSeriesQuery to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Dashboard + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance * @returns {Object.} JSON object */ - Dashboard.prototype.toJSON = function toJSON() { + TimeSeriesQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Dashboard; + return TimeSeriesQuery; })(); - v1.GridLayout = (function() { + v1.TimeSeriesFilter = (function() { /** - * Properties of a GridLayout. + * Properties of a TimeSeriesFilter. * @memberof google.monitoring.dashboard.v1 - * @interface IGridLayout - * @property {number|Long|null} [columns] GridLayout columns - * @property {Array.|null} [widgets] GridLayout widgets + * @interface ITimeSeriesFilter + * @property {string|null} [filter] TimeSeriesFilter filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilter secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter */ /** - * Constructs a new GridLayout. + * Constructs a new TimeSeriesFilter. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GridLayout. - * @implements IGridLayout + * @classdesc Represents a TimeSeriesFilter. + * @implements ITimeSeriesFilter * @constructor - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set */ - function GridLayout(properties) { - this.widgets = []; + function TimeSeriesFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10707,91 +13793,141 @@ } /** - * GridLayout columns. - * @member {number|Long} columns - * @memberof google.monitoring.dashboard.v1.GridLayout + * TimeSeriesFilter filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @instance */ - GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TimeSeriesFilter.prototype.filter = ""; /** - * GridLayout widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.GridLayout + * TimeSeriesFilter aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @instance */ - GridLayout.prototype.widgets = $util.emptyArray; + TimeSeriesFilter.prototype.aggregation = null; /** - * Creates a new GridLayout instance using the specified properties. + * TimeSeriesFilter secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.secondaryAggregation = null; + + /** + * TimeSeriesFilter pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; + + /** + * TimeSeriesFilter statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesFilter outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesFilter instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance */ - GridLayout.create = function create(properties) { - return new GridLayout(properties); + TimeSeriesFilter.create = function create(properties) { + return new TimeSeriesFilter(properties); }; /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encode = function encode(message, writer) { + TimeSeriesFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GridLayout message from the specified reader or buffer. + * Decodes a TimeSeriesFilter message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decode = function decode(reader, length) { + TimeSeriesFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columns = reader.int64(); + message.filter = reader.string(); break; case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10802,148 +13938,177 @@ }; /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decodeDelimited = function decodeDelimited(reader) { + TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GridLayout message. + * Verifies a TimeSeriesFilter message. * @function verify - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GridLayout.verify = function verify(message) { + TimeSeriesFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) - return "columns: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); if (error) - return "widgets." + error; + return "statisticalTimeSeriesFilter." + error; } } return null; }; /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter */ - GridLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + TimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) return object; - var message = new $root.google.monitoring.dashboard.v1.GridLayout(); - if (object.columns != null) - if ($util.Long) - (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; - else if (typeof object.columns === "string") - message.columns = parseInt(object.columns, 10); - else if (typeof object.columns === "number") - message.columns = object.columns; - else if (typeof object.columns === "object") - message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); } return message; }; /** - * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @static - * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout + * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GridLayout.toObject = function toObject(message, options) { + TimeSeriesFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.columns = options.longs === String ? "0" : 0; - if (message.columns != null && message.hasOwnProperty("columns")) - if (typeof message.columns === "number") - object.columns = options.longs === String ? String(message.columns) : message.columns; - else - object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + object.secondaryAggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; } return object; }; /** - * Converts this GridLayout to JSON. + * Converts this TimeSeriesFilter to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter * @instance * @returns {Object.} JSON object */ - GridLayout.prototype.toJSON = function toJSON() { + TimeSeriesFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GridLayout; + return TimeSeriesFilter; })(); - v1.RowLayout = (function() { + v1.TimeSeriesFilterRatio = (function() { /** - * Properties of a RowLayout. + * Properties of a TimeSeriesFilterRatio. * @memberof google.monitoring.dashboard.v1 - * @interface IRowLayout - * @property {Array.|null} [rows] RowLayout rows + * @interface ITimeSeriesFilterRatio + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter */ /** - * Constructs a new RowLayout. + * Constructs a new TimeSeriesFilterRatio. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a RowLayout. - * @implements IRowLayout + * @classdesc Represents a TimeSeriesFilterRatio. + * @implements ITimeSeriesFilterRatio * @constructor - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set */ - function RowLayout(properties) { - this.rows = []; + function TimeSeriesFilterRatio(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10951,78 +14116,141 @@ } /** - * RowLayout rows. - * @member {Array.} rows - * @memberof google.monitoring.dashboard.v1.RowLayout + * TimeSeriesFilterRatio numerator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @instance */ - RowLayout.prototype.rows = $util.emptyArray; + TimeSeriesFilterRatio.prototype.numerator = null; /** - * Creates a new RowLayout instance using the specified properties. + * TimeSeriesFilterRatio denominator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.denominator = null; + + /** + * TimeSeriesFilterRatio secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.secondaryAggregation = null; + + /** + * TimeSeriesFilterRatio pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; + + /** + * TimeSeriesFilterRatio statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TimeSeriesFilterRatio outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance */ - RowLayout.create = function create(properties) { - return new RowLayout(properties); + TimeSeriesFilterRatio.create = function create(properties) { + return new TimeSeriesFilterRatio(properties); }; /** - * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encode = function encode(message, writer) { + TimeSeriesFilterRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowLayout message from the specified reader or buffer. + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decode = function decode(reader, length) { + TimeSeriesFilterRatio.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 2: + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11033,123 +14261,176 @@ }; /** - * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decodeDelimited = function decodeDelimited(reader) { + TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowLayout message. + * Verifies a TimeSeriesFilterRatio message. * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RowLayout.verify = function verify(message) { + TimeSeriesFilterRatio.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + var properties = {}; + if (message.numerator != null && message.hasOwnProperty("numerator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); + if (error) + return "numerator." + error; + } + if (message.denominator != null && message.hasOwnProperty("denominator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); + if (error) + return "denominator." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); if (error) - return "rows." + error; + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; } } return null; }; /** - * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio */ - RowLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + TimeSeriesFilterRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout(); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); - message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); - } + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + if (object.numerator != null) { + if (typeof object.numerator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); + } + if (object.denominator != null) { + if (typeof object.denominator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); } return message; }; /** - * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @static - * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowLayout.toObject = function toObject(message, options) { + TimeSeriesFilterRatio.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rows = []; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + if (options.defaults) { + object.numerator = null; + object.denominator = null; + object.secondaryAggregation = null; + } + if (message.numerator != null && message.hasOwnProperty("numerator")) + object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); + if (message.denominator != null && message.hasOwnProperty("denominator")) + object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; } return object; }; /** - * Converts this RowLayout to JSON. + * Converts this TimeSeriesFilterRatio to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio * @instance * @returns {Object.} JSON object */ - RowLayout.prototype.toJSON = function toJSON() { + TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - RowLayout.Row = (function() { + TimeSeriesFilterRatio.RatioPart = (function() { /** - * Properties of a Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @interface IRow - * @property {number|Long|null} [weight] Row weight - * @property {Array.|null} [widgets] Row widgets + * Properties of a RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @interface IRatioPart + * @property {string|null} [filter] RatioPart filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation */ /** - * Constructs a new Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @classdesc Represents a Row. - * @implements IRow + * Constructs a new RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @classdesc Represents a RatioPart. + * @implements IRatioPart * @constructor - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set */ - function Row(properties) { - this.widgets = []; + function RatioPart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11157,91 +14438,88 @@ } /** - * Row weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * RatioPart filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @instance */ - Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RatioPart.prototype.filter = ""; /** - * Row widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * RatioPart aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @instance */ - Row.prototype.widgets = $util.emptyArray; + RatioPart.prototype.aggregation = null; /** - * Creates a new Row instance using the specified properties. + * Creates a new RatioPart instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance */ - Row.create = function create(properties) { - return new Row(properties); + RatioPart.create = function create(properties) { + return new RatioPart(properties); }; /** - * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encode = function encode(message, writer) { + RatioPart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Row.encodeDelimited = function encodeDelimited(message, writer) { + RatioPart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Row message from the specified reader or buffer. + * Decodes a RatioPart message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decode = function decode(reader, length) { + RatioPart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.weight = reader.int64(); + message.filter = reader.string(); break; case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11252,151 +14530,127 @@ }; /** - * Decodes a Row message from the specified reader or buffer, length delimited. + * Decodes a RatioPart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Row.decodeDelimited = function decodeDelimited(reader) { + RatioPart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Row message. + * Verifies a RatioPart message. * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Row.verify = function verify(message) { + RatioPart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; } return null; }; /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) + RatioPart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); } return message; }; /** - * Creates a plain object from a Row message. Also converts values to other types if specified. + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @static - * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Row.toObject = function toObject(message, options) { + RatioPart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + if (options.defaults) { + object.filter = ""; + object.aggregation = null; } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); return object; }; /** - * Converts this Row to JSON. + * Converts this RatioPart to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart * @instance * @returns {Object.} JSON object */ - Row.prototype.toJSON = function toJSON() { + RatioPart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Row; + return RatioPart; })(); - return RowLayout; + return TimeSeriesFilterRatio; })(); - v1.ColumnLayout = (function() { + v1.Threshold = (function() { /** - * Properties of a ColumnLayout. + * Properties of a Threshold. * @memberof google.monitoring.dashboard.v1 - * @interface IColumnLayout - * @property {Array.|null} [columns] ColumnLayout columns + * @interface IThreshold + * @property {string|null} [label] Threshold label + * @property {number|null} [value] Threshold value + * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color + * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction */ /** - * Constructs a new ColumnLayout. + * Constructs a new Threshold. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ColumnLayout. - * @implements IColumnLayout + * @classdesc Represents a Threshold. + * @implements IThreshold * @constructor - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set */ - function ColumnLayout(properties) { - this.columns = []; + function Threshold(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11404,81 +14658,117 @@ } /** - * ColumnLayout columns. - * @member {Array.} columns - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * Threshold label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.Threshold * @instance */ - ColumnLayout.prototype.columns = $util.emptyArray; + Threshold.prototype.label = ""; /** - * Creates a new ColumnLayout instance using the specified properties. + * Threshold value. + * @member {number} value + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.value = 0; + + /** + * Threshold color. + * @member {google.monitoring.dashboard.v1.Threshold.Color} color + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.color = 0; + + /** + * Threshold direction. + * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.direction = 0; + + /** + * Creates a new Threshold instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance */ - ColumnLayout.create = function create(properties) { - return new ColumnLayout(properties); + Threshold.create = function create(properties) { + return new Threshold(properties); }; /** - * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnLayout.encode = function encode(message, writer) { + Threshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); + if (message.color != null && Object.hasOwnProperty.call(message, "color")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); return writer; }; /** - * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { + Threshold.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnLayout message from the specified reader or buffer. + * Decodes a Threshold message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @memberof google.monitoring.dashboard.v1.Threshold * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnLayout.decode = function decode(reader, length) { + Threshold.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + message.label = reader.string(); + break; + case 2: + message.value = reader.double(); + break; + case 3: + message.color = reader.int32(); + break; + case 4: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); break; } } @@ -11486,515 +14776,306 @@ }; /** - * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnLayout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ColumnLayout message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnLayout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - */ - ColumnLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) - return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); - message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout + * Decodes a Threshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Threshold * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnLayout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); - } - return object; + Threshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * Converts this ColumnLayout to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @instance - * @returns {Object.} JSON object + * Verifies a Threshold message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ColumnLayout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - ColumnLayout.Column = (function() { - - /** - * Properties of a Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @interface IColumn - * @property {number|Long|null} [weight] Column weight - * @property {Array.|null} [widgets] Column widgets - */ - - /** - * Constructs a new Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @classdesc Represents a Column. - * @implements IColumn - * @constructor - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set - */ - function Column(properties) { - this.widgets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Column weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - */ - Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Column widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - */ - Column.prototype.widgets = $util.emptyArray; - - /** - * Creates a new Column instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance - */ - Column.create = function create(properties) { - return new Column(properties); - }; - - /** - * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Column message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.weight = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Column message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Column message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Column.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } - } - return null; - }; - - /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) - return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + Threshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.color != null && message.hasOwnProperty("color")) + switch (message.color) { + default: + return "color: enum value expected"; + case 0: + case 4: + case 6: + break; } - return message; - }; - - /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Column.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; } + return null; + }; + + /** + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + */ + Threshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) return object; - }; + var message = new $root.google.monitoring.dashboard.v1.Threshold(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = Number(object.value); + switch (object.color) { + case "COLOR_UNSPECIFIED": + case 0: + message.color = 0; + break; + case "YELLOW": + case 4: + message.color = 4; + break; + case "RED": + case 6: + message.color = 6; + break; + } + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "ABOVE": + case 1: + message.direction = 1; + break; + case "BELOW": + case 2: + message.direction = 2; + break; + } + return message; + }; - /** - * Converts this Column to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - * @returns {Object.} JSON object - */ - Column.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.Threshold} message Threshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Threshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.value = 0; + object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.color != null && message.hasOwnProperty("color")) + object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + return object; + }; - return Column; + /** + * Converts this Threshold to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + * @returns {Object.} JSON object + */ + Threshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Color enum. + * @name google.monitoring.dashboard.v1.Threshold.Color + * @enum {number} + * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value + * @property {number} YELLOW=4 YELLOW value + * @property {number} RED=6 RED value + */ + Threshold.Color = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; + values[valuesById[4] = "YELLOW"] = 4; + values[valuesById[6] = "RED"] = 6; + return values; })(); - return ColumnLayout; + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.Threshold.Direction + * @enum {number} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} ABOVE=1 ABOVE value + * @property {number} BELOW=2 BELOW value + */ + Threshold.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ABOVE"] = 1; + values[valuesById[2] = "BELOW"] = 2; + return values; + })(); + + return Threshold; })(); - v1.Widget = (function() { + /** + * SparkChartType enum. + * @name google.monitoring.dashboard.v1.SparkChartType + * @enum {number} + * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value + * @property {number} SPARK_LINE=1 SPARK_LINE value + * @property {number} SPARK_BAR=2 SPARK_BAR value + */ + v1.SparkChartType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_LINE"] = 1; + values[valuesById[2] = "SPARK_BAR"] = 2; + return values; + })(); + + v1.Text = (function() { /** - * Properties of a Widget. + * Properties of a Text. * @memberof google.monitoring.dashboard.v1 - * @interface IWidget - * @property {string|null} [title] Widget title - * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart - * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard - * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text - * @property {google.protobuf.IEmpty|null} [blank] Widget blank + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format */ /** - * Constructs a new Widget. + * Constructs a new Text. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Widget. - * @implements IWidget + * @classdesc Represents a Text. + * @implements IText * @constructor - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set */ - function Widget(properties) { + function Text(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - /** - * Widget title. - * @member {string} title - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.title = ""; - - /** - * Widget xyChart. - * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.xyChart = null; - - /** - * Widget scorecard. - * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.scorecard = null; - - /** - * Widget text. - * @member {google.monitoring.dashboard.v1.IText|null|undefined} text - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.text = null; - - /** - * Widget blank. - * @member {google.protobuf.IEmpty|null|undefined} blank - * @memberof google.monitoring.dashboard.v1.Widget + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text * @instance */ - Widget.prototype.blank = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Text.prototype.content = ""; /** - * Widget content. - * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content - * @memberof google.monitoring.dashboard.v1.Widget + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text * @instance */ - Object.defineProperty(Widget.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), - set: $util.oneOfSetter($oneOfFields) - }); + Text.prototype.format = 0; /** - * Creates a new Widget instance using the specified properties. + * Creates a new Text instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Widget} Widget instance + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance */ - Widget.create = function create(properties) { - return new Widget(properties); + Text.create = function create(properties) { + return new Text(properties); }; /** - * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widget.encode = function encode(message, writer) { + Text.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.xyChart != null && Object.hasOwnProperty.call(message, "xyChart")) - $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.scorecard != null && Object.hasOwnProperty.call(message, "scorecard")) - $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.blank != null && Object.hasOwnProperty.call(message, "blank")) - $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); return writer; }; /** - * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Widget.encodeDelimited = function encodeDelimited(message, writer) { + Text.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Widget message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widget.decode = function decode(reader, length) { + Text.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.content = reader.string(); break; case 2: - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); - break; - case 3: - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); - break; - case 4: - message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); - break; - case 5: - message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + message.format = reader.int32(); break; default: reader.skipType(tag & 7); @@ -12005,189 +15086,156 @@ }; /** - * Decodes a Widget message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Text} Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Widget.decodeDelimited = function decodeDelimited(reader) { + Text.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Widget message. + * Verifies a Text message. * @function verify - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Widget.verify = function verify(message) { + Text.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); - if (error) - return "xyChart." + error; - } - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); - if (error) - return "scorecard." + error; - } - } - if (message.text != null && message.hasOwnProperty("text")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.blank != null && message.hasOwnProperty("blank")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.protobuf.Empty.verify(message.blank); - if (error) - return "blank." + error; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @returns {google.monitoring.dashboard.v1.Text} Text */ - Widget.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Widget) + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Text) return object; - var message = new $root.google.monitoring.dashboard.v1.Widget(); - if (object.title != null) - message.title = String(object.title); - if (object.xyChart != null) { - if (typeof object.xyChart !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); - } - if (object.scorecard != null) { - if (typeof object.scorecard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); - } - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); - message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); - } - if (object.blank != null) { - if (typeof object.blank !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); - message.blank = $root.google.protobuf.Empty.fromObject(object.blank); + var message = new $root.google.monitoring.dashboard.v1.Text(); + if (object.content != null) + message.content = String(object.content); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "MARKDOWN": + case 1: + message.format = 1; + break; + case "RAW": + case 2: + message.format = 2; + break; } return message; }; /** - * Creates a plain object from a Widget message. Also converts values to other types if specified. + * Creates a plain object from a Text message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @static - * @param {google.monitoring.dashboard.v1.Widget} message Widget + * @param {google.monitoring.dashboard.v1.Text} message Text * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Widget.toObject = function toObject(message, options) { + Text.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); - if (options.oneofs) - object.content = "xyChart"; - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); - if (options.oneofs) - object.content = "scorecard"; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); - if (options.oneofs) - object.content = "text"; - } - if (message.blank != null && message.hasOwnProperty("blank")) { - object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); - if (options.oneofs) - object.content = "blank"; + if (options.defaults) { + object.content = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; return object; }; /** - * Converts this Widget to JSON. + * Converts this Text to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Widget + * @memberof google.monitoring.dashboard.v1.Text * @instance * @returns {Object.} JSON object */ - Widget.prototype.toJSON = function toJSON() { + Text.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Widget; + /** + * Format enum. + * @name google.monitoring.dashboard.v1.Text.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} MARKDOWN=1 MARKDOWN value + * @property {number} RAW=2 RAW value + */ + Text.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MARKDOWN"] = 1; + values[valuesById[2] = "RAW"] = 2; + return values; + })(); + + return Text; })(); - v1.Scorecard = (function() { + v1.XyChart = (function() { /** - * Properties of a Scorecard. + * Properties of a XyChart. * @memberof google.monitoring.dashboard.v1 - * @interface IScorecard - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery - * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView - * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView - * @property {Array.|null} [thresholds] Scorecard thresholds + * @interface IXyChart + * @property {Array.|null} [dataSets] XyChart dataSets + * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration + * @property {Array.|null} [thresholds] XyChart thresholds + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions */ /** - * Constructs a new Scorecard. + * Constructs a new XyChart. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Scorecard. - * @implements IScorecard + * @classdesc Represents a XyChart. + * @implements IXyChart * @constructor - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set */ - function Scorecard(properties) { + function XyChart(properties) { + this.dataSets = []; this.thresholds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -12196,520 +15244,354 @@ } /** - * Scorecard timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.Scorecard + * XyChart dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - Scorecard.prototype.timeSeriesQuery = null; + XyChart.prototype.dataSets = $util.emptyArray; /** - * Scorecard gaugeView. - * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView - * @memberof google.monitoring.dashboard.v1.Scorecard + * XyChart timeshiftDuration. + * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - Scorecard.prototype.gaugeView = null; + XyChart.prototype.timeshiftDuration = null; /** - * Scorecard sparkChartView. - * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView - * @memberof google.monitoring.dashboard.v1.Scorecard + * XyChart thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - Scorecard.prototype.sparkChartView = null; + XyChart.prototype.thresholds = $util.emptyArray; /** - * Scorecard thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.Scorecard + * XyChart xAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - Scorecard.prototype.thresholds = $util.emptyArray; + XyChart.prototype.xAxis = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * XyChart yAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.yAxis = null; /** - * Scorecard dataView. - * @member {"gaugeView"|"sparkChartView"|undefined} dataView - * @memberof google.monitoring.dashboard.v1.Scorecard + * XyChart chartOptions. + * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions + * @memberof google.monitoring.dashboard.v1.XyChart * @instance */ - Object.defineProperty(Scorecard.prototype, "dataView", { - get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), - set: $util.oneOfSetter($oneOfFields) - }); + XyChart.prototype.chartOptions = null; /** - * Creates a new Scorecard instance using the specified properties. + * Creates a new XyChart instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance */ - Scorecard.create = function create(properties) { - return new Scorecard(properties); + XyChart.create = function create(properties) { + return new XyChart(properties); }; /** - * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Scorecard.encode = function encode(message, writer) { + XyChart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gaugeView != null && Object.hasOwnProperty.call(message, "gaugeView")) - $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sparkChartView != null && Object.hasOwnProperty.call(message, "sparkChartView")) - $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeshiftDuration != null && Object.hasOwnProperty.call(message, "timeshiftDuration")) + $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.thresholds != null && message.thresholds.length) for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.xAxis != null && Object.hasOwnProperty.call(message, "xAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yAxis != null && Object.hasOwnProperty.call(message, "yAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) + $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Scorecard.encodeDelimited = function encodeDelimited(message, writer) { + XyChart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Scorecard message from the specified reader or buffer. + * Decodes a XyChart message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard + * @memberof google.monitoring.dashboard.v1.XyChart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Scorecard.decode = function decode(reader, length) { + XyChart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); break; case 4: - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); + message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 5: - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); - break; - case 6: if (!(message.thresholds && message.thresholds.length)) message.thresholds = []; message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scorecard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scorecard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scorecard message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scorecard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; - } - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - properties.dataView = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); - if (error) - return "gaugeView." + error; - } - } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - if (properties.dataView === 1) - return "dataView: multiple values"; - properties.dataView = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); - if (error) - return "sparkChartView." + error; - } - } - if (message.thresholds != null && message.hasOwnProperty("thresholds")) { - if (!Array.isArray(message.thresholds)) - return "thresholds: array expected"; - for (var i = 0; i < message.thresholds.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); - if (error) - return "thresholds." + error; - } - } - return null; - }; - - /** - * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard - */ - Scorecard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); - } - if (object.gaugeView != null) { - if (typeof object.gaugeView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); - } - if (object.sparkChartView != null) { - if (typeof object.sparkChartView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); - } - if (object.thresholds) { - if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); - message.thresholds = []; - for (var i = 0; i < object.thresholds.length; ++i) { - if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); - message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + case 6: + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 7: + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 8: + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Creates a plain object from a Scorecard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard + * Decodes a XyChart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart * @static - * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scorecard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.thresholds = []; - if (options.defaults) - object.timeSeriesQuery = null; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); - if (options.oneofs) - object.dataView = "gaugeView"; - } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); - if (options.oneofs) - object.dataView = "sparkChartView"; - } - if (message.thresholds && message.thresholds.length) { - object.thresholds = []; - for (var j = 0; j < message.thresholds.length; ++j) - object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); - } - return object; - }; - - /** - * Converts this Scorecard to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - * @returns {Object.} JSON object + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Scorecard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Scorecard.GaugeView = (function() { - - /** - * Properties of a GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface IGaugeView - * @property {number|null} [lowerBound] GaugeView lowerBound - * @property {number|null} [upperBound] GaugeView upperBound - */ - - /** - * Constructs a new GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a GaugeView. - * @implements IGaugeView - * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - */ - function GaugeView(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GaugeView lowerBound. - * @member {number} lowerBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.lowerBound = 0; - - /** - * GaugeView upperBound. - * @member {number} upperBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.upperBound = 0; - - /** - * Creates a new GaugeView instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance - */ - GaugeView.create = function create(properties) { - return new GaugeView(properties); - }; - - /** - * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); - if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); - return writer; - }; - - /** - * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GaugeView message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lowerBound = reader.double(); - break; - case 2: - message.upperBound = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GaugeView message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GaugeView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GaugeView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound !== "number") - return "lowerBound: number expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound !== "number") - return "upperBound: number expected"; - return null; - }; - - /** - * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - */ - GaugeView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - if (object.lowerBound != null) - message.lowerBound = Number(object.lowerBound); - if (object.upperBound != null) - message.upperBound = Number(object.upperBound); - return message; - }; - - /** - * Creates a plain object from a GaugeView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GaugeView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lowerBound = 0; - object.upperBound = 0; + XyChart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a XyChart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + XyChart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); + if (error) + return "dataSets." + error; } - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { + var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); + if (error) + return "timeshiftDuration." + error; + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; + } + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); + if (error) + return "xAxis." + error; + } + if (message.yAxis != null && message.hasOwnProperty("yAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); + if (error) + return "yAxis." + error; + } + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { + var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); + if (error) + return "chartOptions." + error; + } + return null; + }; + + /** + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + */ + XyChart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) return object; - }; + var message = new $root.google.monitoring.dashboard.v1.XyChart(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); + } + } + if (object.timeshiftDuration != null) { + if (typeof object.timeshiftDuration !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); + message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } + } + if (object.xAxis != null) { + if (typeof object.xAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); + } + if (object.yAxis != null) { + if (typeof object.yAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); + } + if (object.chartOptions != null) { + if (typeof object.chartOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); + } + return message; + }; - /** - * Converts this GaugeView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - * @returns {Object.} JSON object - */ - GaugeView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.XyChart} message XyChart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + XyChart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSets = []; + object.thresholds = []; + } + if (options.defaults) { + object.timeshiftDuration = null; + object.xAxis = null; + object.yAxis = null; + object.chartOptions = null; + } + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + return object; + }; - return GaugeView; - })(); + /** + * Converts this XyChart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + * @returns {Object.} JSON object + */ + XyChart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Scorecard.SparkChartView = (function() { + XyChart.DataSet = (function() { /** - * Properties of a SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface ISparkChartView - * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod + * Properties of a DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType + * @property {string|null} [legendTemplate] DataSet legendTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod */ /** - * Constructs a new SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a SparkChartView. - * @implements ISparkChartView + * Constructs a new DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents a DataSet. + * @implements IDataSet * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set */ - function SparkChartView(properties) { + function DataSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12717,87 +15599,113 @@ } /** - * SparkChartView sparkChartType. - * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * DataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @instance */ - SparkChartView.prototype.sparkChartType = 0; + DataSet.prototype.timeSeriesQuery = null; /** - * SparkChartView minAlignmentPeriod. + * DataSet plotType. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.plotType = 0; + + /** + * DataSet legendTemplate. + * @member {string} legendTemplate + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.legendTemplate = ""; + + /** + * DataSet minAlignmentPeriod. * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @instance */ - SparkChartView.prototype.minAlignmentPeriod = null; + DataSet.prototype.minAlignmentPeriod = null; /** - * Creates a new SparkChartView instance using the specified properties. + * Creates a new DataSet instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance */ - SparkChartView.create = function create(properties) { - return new SparkChartView(properties); + DataSet.create = function create(properties) { + return new DataSet(properties); }; /** - * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkChartView.encode = function encode(message, writer) { + DataSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sparkChartType != null && Object.hasOwnProperty.call(message, "sparkChartType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.plotType != null && Object.hasOwnProperty.call(message, "plotType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); + if (message.legendTemplate != null && Object.hasOwnProperty.call(message, "legendTemplate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { + DataSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SparkChartView message from the specified reader or buffer. + * Decodes a DataSet message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkChartView.decode = function decode(reader, length) { + DataSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sparkChartType = reader.int32(); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); break; case 2: + message.plotType = reader.int32(); + break; + case 3: + message.legendTemplate = reader.string(); + break; + case 4: message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: @@ -12809,710 +15717,437 @@ }; /** - * Decodes a SparkChartView message from the specified reader or buffer, length delimited. + * Decodes a DataSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkChartView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SparkChartView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkChartView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - switch (message.sparkChartType) { - default: - return "sparkChartType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); - if (error) - return "minAlignmentPeriod." + error; - } - return null; - }; - - /** - * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - */ - SparkChartView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); - switch (object.sparkChartType) { - case "SPARK_CHART_TYPE_UNSPECIFIED": - case 0: - message.sparkChartType = 0; - break; - case "SPARK_LINE": - case 1: - message.sparkChartType = 1; - break; - case "SPARK_BAR": - case 2: - message.sparkChartType = 2; - break; - } - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; - - /** - * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SparkChartView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; - object.minAlignmentPeriod = null; - } - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; - - /** - * Converts this SparkChartView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - * @returns {Object.} JSON object - */ - SparkChartView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SparkChartView; - })(); - - return Scorecard; - })(); - - v1.TimeSeriesQuery = (function() { - - /** - * Properties of a TimeSeriesQuery. - * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesQuery - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio - * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride - */ - - /** - * Constructs a new TimeSeriesQuery. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesQuery. - * @implements ITimeSeriesQuery - * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set - */ - function TimeSeriesQuery(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimeSeriesQuery timeSeriesFilter. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.timeSeriesFilter = null; - - /** - * TimeSeriesQuery timeSeriesFilterRatio. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; - - /** - * TimeSeriesQuery unitOverride. - * @member {string} unitOverride - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.unitOverride = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TimeSeriesQuery source. - * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|undefined} source - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - Object.defineProperty(TimeSeriesQuery.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TimeSeriesQuery instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance - */ - TimeSeriesQuery.create = function create(properties) { - return new TimeSeriesQuery(properties); - }; - - /** - * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeriesFilter != null && Object.hasOwnProperty.call(message, "timeSeriesFilter")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSeriesFilterRatio != null && Object.hasOwnProperty.call(message, "timeSeriesFilterRatio")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.unitOverride != null && Object.hasOwnProperty.call(message, "unitOverride")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); - return writer; - }; - - /** - * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Verifies a DataSet message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.plotType != null && message.hasOwnProperty("plotType")) + switch (message.plotType) { + default: + return "plotType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + if (!$util.isString(message.legendTemplate)) + return "legendTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; + + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + */ + DataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + switch (object.plotType) { + case "PLOT_TYPE_UNSPECIFIED": + case 0: + message.plotType = 0; + break; + case "LINE": case 1: - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); + message.plotType = 1; break; + case "STACKED_AREA": case 2: - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); + message.plotType = 2; break; - case 5: - message.unitOverride = reader.string(); + case "STACKED_BAR": + case 3: + message.plotType = 3; break; - default: - reader.skipType(tag & 7); + case "HEATMAP": + case 4: + message.plotType = 4; break; } - } - return message; - }; - - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeSeriesQuery message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - properties.source = 1; - { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); - if (error) - return "timeSeriesFilter." + error; - } - } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); - if (error) - return "timeSeriesFilterRatio." + error; + if (object.legendTemplate != null) + message.legendTemplate = String(object.legendTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); } - } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - if (!$util.isString(message.unitOverride)) - return "unitOverride: string expected"; - return null; - }; - - /** - * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - */ - TimeSeriesQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); - if (object.timeSeriesFilter != null) { - if (typeof object.timeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); - } - if (object.timeSeriesFilterRatio != null) { - if (typeof object.timeSeriesFilterRatio !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); - } - if (object.unitOverride != null) - message.unitOverride = String(object.unitOverride); - return message; - }; - - /** - * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.unitOverride = ""; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); - if (options.oneofs) - object.source = "timeSeriesFilter"; - } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); - if (options.oneofs) - object.source = "timeSeriesFilterRatio"; - } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - object.unitOverride = message.unitOverride; - return object; - }; + return message; + }; - /** - * Converts this TimeSeriesQuery to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; + object.legendTemplate = ""; + object.minAlignmentPeriod = null; + } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.plotType != null && message.hasOwnProperty("plotType")) + object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + object.legendTemplate = message.legendTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; - return TimeSeriesQuery; - })(); + /** + * Converts this DataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + * @returns {Object.} JSON object + */ + DataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.TimeSeriesFilter = (function() { + /** + * PlotType enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType + * @enum {number} + * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value + * @property {number} LINE=1 LINE value + * @property {number} STACKED_AREA=2 STACKED_AREA value + * @property {number} STACKED_BAR=3 STACKED_BAR value + * @property {number} HEATMAP=4 HEATMAP value + */ + DataSet.PlotType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE"] = 1; + values[valuesById[2] = "STACKED_AREA"] = 2; + values[valuesById[3] = "STACKED_BAR"] = 3; + values[valuesById[4] = "HEATMAP"] = 4; + return values; + })(); - /** - * Properties of a TimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilter - * @property {string|null} [filter] TimeSeriesFilter filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter - */ + return DataSet; + })(); - /** - * Constructs a new TimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilter. - * @implements ITimeSeriesFilter - * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set - */ - function TimeSeriesFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + XyChart.Axis = (function() { - /** - * TimeSeriesFilter filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.filter = ""; + /** + * Properties of an Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IAxis + * @property {string|null} [label] Axis label + * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale + */ - /** - * TimeSeriesFilter aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.aggregation = null; + /** + * Constructs a new Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents an Axis. + * @implements IAxis + * @constructor + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + */ + function Axis(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TimeSeriesFilter pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; + /** + * Axis label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.label = ""; - /** - * TimeSeriesFilter statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; + /** + * Axis scale. + * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.scale = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new Axis instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance + */ + Axis.create = function create(properties) { + return new Axis(properties); + }; - /** - * TimeSeriesFilter outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); + return writer; + }; - /** - * Creates a new TimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance - */ - TimeSeriesFilter.create = function create(properties) { - return new TimeSeriesFilter(properties); - }; + /** + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilter.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Decodes an Axis message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.label = reader.string(); + break; + case 2: + message.scale = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Axis message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an Axis message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Axis.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + switch (message.scale) { + default: + return "scale: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates an Axis message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + */ + Axis.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + if (object.label != null) + message.label = String(object.label); + switch (object.scale) { + case "SCALE_UNSPECIFIED": + case 0: + message.scale = 0; + break; + case "LINEAR": case 1: - message.filter = reader.string(); + message.scale = 1; break; + case "LOG10": case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + message.scale = 2; break; } - } - return message; - }; - - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a TimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); - if (error) - return "statisticalTimeSeriesFilter." + error; + /** + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Axis.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; } - } - return null; - }; - - /** - * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - */ - TimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); - } - return message; - }; + }; - /** - * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; - } - return object; - }; + /** + * Converts this Axis to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + * @returns {Object.} JSON object + */ + Axis.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Scale enum. + * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale + * @enum {number} + * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value + * @property {number} LINEAR=1 LINEAR value + * @property {number} LOG10=2 LOG10 value + */ + Axis.Scale = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINEAR"] = 1; + values[valuesById[2] = "LOG10"] = 2; + return values; + })(); - /** - * Converts this TimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Axis; + })(); - return TimeSeriesFilter; + return XyChart; })(); - v1.TimeSeriesFilterRatio = (function() { + v1.ChartOptions = (function() { /** - * Properties of a TimeSeriesFilterRatio. + * Properties of a ChartOptions. * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilterRatio - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator - * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter + * @interface IChartOptions + * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode */ /** - * Constructs a new TimeSeriesFilterRatio. + * Constructs a new ChartOptions. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilterRatio. - * @implements ITimeSeriesFilterRatio + * @classdesc Represents a ChartOptions. + * @implements IChartOptions * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set */ - function TimeSeriesFilterRatio(properties) { + function ChartOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13520,141 +16155,75 @@ } /** - * TimeSeriesFilterRatio numerator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.numerator = null; - - /** - * TimeSeriesFilterRatio denominator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.denominator = null; - - /** - * TimeSeriesFilterRatio secondaryAggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.secondaryAggregation = null; - - /** - * TimeSeriesFilterRatio pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; - - /** - * TimeSeriesFilterRatio statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TimeSeriesFilterRatio outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * ChartOptions mode. + * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode + * @memberof google.monitoring.dashboard.v1.ChartOptions * @instance */ - Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + ChartOptions.prototype.mode = 0; /** - * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * Creates a new ChartOptions instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance */ - TimeSeriesFilterRatio.create = function create(properties) { - return new TimeSeriesFilterRatio(properties); + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); }; /** - * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilterRatio.encode = function encode(message, writer) { + ChartOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * Decodes a ChartOptions message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilterRatio.decode = function decode(reader, length) { + ChartOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 2: - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + message.mode = reader.int32(); break; default: reader.skipType(tag & 7); @@ -13665,396 +16234,349 @@ }; /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { + ChartOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeriesFilterRatio message. + * Verifies a ChartOptions message. * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeriesFilterRatio.verify = function verify(message) { + ChartOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.numerator != null && message.hasOwnProperty("numerator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); - if (error) - return "numerator." + error; - } - if (message.denominator != null && message.hasOwnProperty("denominator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); - if (error) - return "denominator." + error; - } - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); - if (error) - return "secondaryAggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); - if (error) - return "statisticalTimeSeriesFilter." + error; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } return null; }; /** - * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions */ - TimeSeriesFilterRatio.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); - if (object.numerator != null) { - if (typeof object.numerator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); - } - if (object.denominator != null) { - if (typeof object.denominator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); - } - if (object.secondaryAggregation != null) { - if (typeof object.secondaryAggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "COLOR": + case 1: + message.mode = 1; + break; + case "X_RAY": + case 2: + message.mode = 2; + break; + case "STATS": + case 3: + message.mode = 3; + break; } return message; }; /** - * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio + * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeriesFilterRatio.toObject = function toObject(message, options) { + ChartOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.numerator = null; - object.denominator = null; - object.secondaryAggregation = null; - } - if (message.numerator != null && message.hasOwnProperty("numerator")) - object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); - if (message.denominator != null && message.hasOwnProperty("denominator")) - object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) - object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; - } + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; return object; }; /** - * Converts this TimeSeriesFilterRatio to JSON. + * Converts this ChartOptions to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.ChartOptions * @instance * @returns {Object.} JSON object */ - TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { + ChartOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TimeSeriesFilterRatio.RatioPart = (function() { + /** + * Mode enum. + * @name google.monitoring.dashboard.v1.ChartOptions.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} COLOR=1 COLOR value + * @property {number} X_RAY=2 X_RAY value + * @property {number} STATS=3 STATS value + */ + ChartOptions.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COLOR"] = 1; + values[valuesById[2] = "X_RAY"] = 2; + values[valuesById[3] = "STATS"] = 3; + return values; + })(); - /** - * Properties of a RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @interface IRatioPart - * @property {string|null} [filter] RatioPart filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation - */ + return ChartOptions; + })(); - /** - * Constructs a new RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @classdesc Represents a RatioPart. - * @implements IRatioPart - * @constructor - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set - */ - function RatioPart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.DashboardsService = (function() { - /** - * RatioPart filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - */ - RatioPart.prototype.filter = ""; + /** + * Constructs a new DashboardsService service. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DashboardsService + * @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 DashboardsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * RatioPart aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - */ - RatioPart.prototype.aggregation = null; + (DashboardsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DashboardsService; - /** - * Creates a new RatioPart instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance - */ - RatioPart.create = function create(properties) { - return new RatioPart(properties); - }; + /** + * Creates new DashboardsService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @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 {DashboardsService} RPC service. Useful where requests and/or responses are streamed. + */ + DashboardsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatioPart.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef CreateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ - /** - * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatioPart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.createDashboard = function createDashboard(request, callback) { + return this.rpcCall(createDashboard, $root.google.monitoring.dashboard.v1.CreateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "CreateDashboard" }); + + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef ListDashboardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} [response] ListDashboardsResponse + */ + + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback} callback Node-style callback called with the error, if any, and ListDashboardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.listDashboards = function listDashboards(request, callback) { + return this.rpcCall(listDashboards, $root.google.monitoring.dashboard.v1.ListDashboardsRequest, $root.google.monitoring.dashboard.v1.ListDashboardsResponse, request, callback); + }, "name", { value: "ListDashboards" }); + + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef GetDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ + + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.getDashboard = function getDashboard(request, callback) { + return this.rpcCall(getDashboard, $root.google.monitoring.dashboard.v1.GetDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "GetDashboard" }); - /** - * Decodes a RatioPart message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatioPart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a RatioPart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatioPart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef DeleteDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Verifies a RatioPart message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RatioPart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - return null; - }; + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.deleteDashboard = function deleteDashboard(request, callback) { + return this.rpcCall(deleteDashboard, $root.google.monitoring.dashboard.v1.DeleteDashboardRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDashboard" }); - /** - * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - */ - RatioPart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - return message; - }; + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a RatioPart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RatioPart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); - return object; - }; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef UpdateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ - /** - * Converts this RatioPart to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - * @returns {Object.} JSON object - */ - RatioPart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.updateDashboard = function updateDashboard(request, callback) { + return this.rpcCall(updateDashboard, $root.google.monitoring.dashboard.v1.UpdateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "UpdateDashboard" }); - return RatioPart; - })(); + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return TimeSeriesFilterRatio; + return DashboardsService; })(); - v1.Threshold = (function() { + v1.CreateDashboardRequest = (function() { /** - * Properties of a Threshold. + * Properties of a CreateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @interface IThreshold - * @property {string|null} [label] Threshold label - * @property {number|null} [value] Threshold value - * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color - * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + * @interface ICreateDashboardRequest + * @property {string|null} [parent] CreateDashboardRequest parent + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] CreateDashboardRequest dashboard */ /** - * Constructs a new Threshold. + * Constructs a new CreateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Threshold. - * @implements IThreshold + * @classdesc Represents a CreateDashboardRequest. + * @implements ICreateDashboardRequest * @constructor - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set */ - function Threshold(properties) { + function CreateDashboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14062,114 +16584,88 @@ } /** - * Threshold label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.label = ""; - - /** - * Threshold value. - * @member {number} value - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.value = 0; - - /** - * Threshold color. - * @member {google.monitoring.dashboard.v1.Threshold.Color} color - * @memberof google.monitoring.dashboard.v1.Threshold + * CreateDashboardRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @instance */ - Threshold.prototype.color = 0; + CreateDashboardRequest.prototype.parent = ""; /** - * Threshold direction. - * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction - * @memberof google.monitoring.dashboard.v1.Threshold + * CreateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @instance */ - Threshold.prototype.direction = 0; + CreateDashboardRequest.prototype.dashboard = null; /** - * Creates a new Threshold instance using the specified properties. + * Creates a new CreateDashboardRequest instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest instance */ - Threshold.create = function create(properties) { - return new Threshold(properties); + CreateDashboardRequest.create = function create(properties) { + return new CreateDashboardRequest(properties); }; /** - * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Threshold.encode = function encode(message, writer) { + CreateDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - if (message.color != null && Object.hasOwnProperty.call(message, "color")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Threshold.encodeDelimited = function encodeDelimited(message, writer) { + CreateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Threshold message from the specified reader or buffer. + * Decodes a CreateDashboardRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Threshold.decode = function decode(reader, length) { + CreateDashboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.label = reader.string(); + message.parent = reader.string(); break; case 2: - message.value = reader.double(); - break; - case 3: - message.color = reader.int32(); - break; - case 4: - message.direction = reader.int32(); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14180,217 +16676,123 @@ }; /** - * Decodes a Threshold message from the specified reader or buffer, length delimited. + * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Threshold.decodeDelimited = function decodeDelimited(reader) { + CreateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Threshold message. + * Verifies a CreateDashboardRequest message. * @function verify - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Threshold.verify = function verify(message) { + CreateDashboardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.color != null && message.hasOwnProperty("color")) - switch (message.color) { - default: - return "color: enum value expected"; - case 0: - case 4: - case 6: - break; - } - if (message.direction != null && message.hasOwnProperty("direction")) - switch (message.direction) { - default: - return "direction: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } return null; }; /** - * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest */ - Threshold.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) + CreateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.CreateDashboardRequest) return object; - var message = new $root.google.monitoring.dashboard.v1.Threshold(); - if (object.label != null) - message.label = String(object.label); - if (object.value != null) - message.value = Number(object.value); - switch (object.color) { - case "COLOR_UNSPECIFIED": - case 0: - message.color = 0; - break; - case "YELLOW": - case 4: - message.color = 4; - break; - case "RED": - case 6: - message.color = 6; - break; - } - switch (object.direction) { - case "DIRECTION_UNSPECIFIED": - case 0: - message.direction = 0; - break; - case "ABOVE": - case 1: - message.direction = 1; - break; - case "BELOW": - case 2: - message.direction = 2; - break; + var message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); } return message; }; /** - * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.Threshold} message Threshold + * @param {google.monitoring.dashboard.v1.CreateDashboardRequest} message CreateDashboardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Threshold.toObject = function toObject(message, options) { + CreateDashboardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.label = ""; - object.value = 0; - object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; - object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + object.parent = ""; + object.dashboard = null; } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.color != null && message.hasOwnProperty("color")) - object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); return object; }; /** - * Converts this Threshold to JSON. + * Converts this CreateDashboardRequest to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Threshold + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest * @instance * @returns {Object.} JSON object */ - Threshold.prototype.toJSON = function toJSON() { + CreateDashboardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Color enum. - * @name google.monitoring.dashboard.v1.Threshold.Color - * @enum {number} - * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value - * @property {number} YELLOW=4 YELLOW value - * @property {number} RED=6 RED value - */ - Threshold.Color = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; - values[valuesById[4] = "YELLOW"] = 4; - values[valuesById[6] = "RED"] = 6; - return values; - })(); - - /** - * Direction enum. - * @name google.monitoring.dashboard.v1.Threshold.Direction - * @enum {number} - * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value - * @property {number} ABOVE=1 ABOVE value - * @property {number} BELOW=2 BELOW value - */ - Threshold.Direction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ABOVE"] = 1; - values[valuesById[2] = "BELOW"] = 2; - return values; - })(); - - return Threshold; - })(); - - /** - * SparkChartType enum. - * @name google.monitoring.dashboard.v1.SparkChartType - * @enum {number} - * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value - * @property {number} SPARK_LINE=1 SPARK_LINE value - * @property {number} SPARK_BAR=2 SPARK_BAR value - */ - v1.SparkChartType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_LINE"] = 1; - values[valuesById[2] = "SPARK_BAR"] = 2; - return values; + return CreateDashboardRequest; })(); - v1.Text = (function() { + v1.ListDashboardsRequest = (function() { /** - * Properties of a Text. + * Properties of a ListDashboardsRequest. * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + * @interface IListDashboardsRequest + * @property {string|null} [parent] ListDashboardsRequest parent + * @property {number|null} [pageSize] ListDashboardsRequest pageSize + * @property {string|null} [pageToken] ListDashboardsRequest pageToken */ /** - * Constructs a new Text. + * Constructs a new ListDashboardsRequest. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText + * @classdesc Represents a ListDashboardsRequest. + * @implements IListDashboardsRequest * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set */ - function Text(properties) { + function ListDashboardsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14398,88 +16800,101 @@ } /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text + * ListDashboardsRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @instance */ - Text.prototype.content = ""; + ListDashboardsRequest.prototype.parent = ""; /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text + * ListDashboardsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @instance */ - Text.prototype.format = 0; + ListDashboardsRequest.prototype.pageSize = 0; /** - * Creates a new Text instance using the specified properties. + * ListDashboardsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDashboardsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest instance */ - Text.create = function create(properties) { - return new Text(properties); + ListDashboardsRequest.create = function create(properties) { + return new ListDashboardsRequest(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + ListDashboardsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + ListDashboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a ListDashboardsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Text} Text + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decode = function decode(reader, length) { + ListDashboardsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.content = reader.string(); + message.parent = reader.string(); break; case 2: - message.format = reader.int32(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14490,304 +16905,218 @@ }; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Text} Text + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Text.decodeDelimited = function decodeDelimited(reader) { + ListDashboardsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Text message. + * Verifies a ListDashboardsRequest message. * @function verify - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Text.verify = function verify(message) { + ListDashboardsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. + * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Text} Text + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Text) + ListDashboardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsRequest) return object; - var message = new $root.google.monitoring.dashboard.v1.Text(); - if (object.content != null) - message.content = String(object.content); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "MARKDOWN": - case 1: - message.format = 1; - break; - case "RAW": - case 2: - message.format = 2; - break; - } + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a Text message. Also converts values to other types if specified. + * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @static - * @param {google.monitoring.dashboard.v1.Text} message Text + * @param {google.monitoring.dashboard.v1.ListDashboardsRequest} message ListDashboardsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Text.toObject = function toObject(message, options) { + ListDashboardsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.content = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this Text to JSON. + * Converts this ListDashboardsRequest to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest * @instance * @returns {Object.} JSON object */ - Text.prototype.toJSON = function toJSON() { + ListDashboardsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Format enum. - * @name google.monitoring.dashboard.v1.Text.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} MARKDOWN=1 MARKDOWN value - * @property {number} RAW=2 RAW value - */ - Text.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MARKDOWN"] = 1; - values[valuesById[2] = "RAW"] = 2; - return values; - })(); - - return Text; + return ListDashboardsRequest; })(); - v1.XyChart = (function() { + v1.ListDashboardsResponse = (function() { /** - * Properties of a XyChart. + * Properties of a ListDashboardsResponse. * @memberof google.monitoring.dashboard.v1 - * @interface IXyChart - * @property {Array.|null} [dataSets] XyChart dataSets - * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration - * @property {Array.|null} [thresholds] XyChart thresholds - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis - * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions + * @interface IListDashboardsResponse + * @property {Array.|null} [dashboards] ListDashboardsResponse dashboards + * @property {string|null} [nextPageToken] ListDashboardsResponse nextPageToken */ /** - * Constructs a new XyChart. + * Constructs a new ListDashboardsResponse. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a XyChart. - * @implements IXyChart - * @constructor - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - */ - function XyChart(properties) { - this.dataSets = []; - this.thresholds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * XyChart dataSets. - * @member {Array.} dataSets - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.dataSets = $util.emptyArray; - - /** - * XyChart timeshiftDuration. - * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.timeshiftDuration = null; - - /** - * XyChart thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.thresholds = $util.emptyArray; - - /** - * XyChart xAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance + * @classdesc Represents a ListDashboardsResponse. + * @implements IListDashboardsResponse + * @constructor + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set */ - XyChart.prototype.xAxis = null; + function ListDashboardsResponse(properties) { + this.dashboards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * XyChart yAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis - * @memberof google.monitoring.dashboard.v1.XyChart + * ListDashboardsResponse dashboards. + * @member {Array.} dashboards + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @instance */ - XyChart.prototype.yAxis = null; + ListDashboardsResponse.prototype.dashboards = $util.emptyArray; /** - * XyChart chartOptions. - * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions - * @memberof google.monitoring.dashboard.v1.XyChart + * ListDashboardsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @instance */ - XyChart.prototype.chartOptions = null; + ListDashboardsResponse.prototype.nextPageToken = ""; /** - * Creates a new XyChart instance using the specified properties. + * Creates a new ListDashboardsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse instance */ - XyChart.create = function create(properties) { - return new XyChart(properties); + ListDashboardsResponse.create = function create(properties) { + return new ListDashboardsResponse(properties); }; /** - * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - XyChart.encode = function encode(message, writer) { + ListDashboardsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSets != null && message.dataSets.length) - for (var i = 0; i < message.dataSets.length; ++i) - $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeshiftDuration != null && Object.hasOwnProperty.call(message, "timeshiftDuration")) - $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.thresholds != null && message.thresholds.length) - for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.xAxis != null && Object.hasOwnProperty.call(message, "xAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yAxis != null && Object.hasOwnProperty.call(message, "yAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) - $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dashboards != null && message.dashboards.length) + for (var i = 0; i < message.dashboards.length; ++i) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[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 XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - XyChart.encodeDelimited = function encodeDelimited(message, writer) { + ListDashboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a XyChart message from the specified reader or buffer. + * Decodes a ListDashboardsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - XyChart.decode = function decode(reader, length) { + ListDashboardsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.dataSets && message.dataSets.length)) - message.dataSets = []; - message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); - break; - case 4: - message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); - break; - case 6: - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 7: - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + if (!(message.dashboards && message.dashboards.length)) + message.dashboards = []; + message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); break; - case 8: - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14798,760 +17127,507 @@ }; /** - * Decodes a XyChart message from the specified reader or buffer, length delimited. + * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - XyChart.decodeDelimited = function decodeDelimited(reader) { + ListDashboardsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a XyChart message. + * Verifies a ListDashboardsResponse message. * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - XyChart.verify = function verify(message) { + ListDashboardsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSets != null && message.hasOwnProperty("dataSets")) { - if (!Array.isArray(message.dataSets)) - return "dataSets: array expected"; - for (var i = 0; i < message.dataSets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); - if (error) - return "dataSets." + error; - } - } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { - var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); - if (error) - return "timeshiftDuration." + error; - } - if (message.thresholds != null && message.hasOwnProperty("thresholds")) { - if (!Array.isArray(message.thresholds)) - return "thresholds: array expected"; - for (var i = 0; i < message.thresholds.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (message.dashboards != null && message.hasOwnProperty("dashboards")) { + if (!Array.isArray(message.dashboards)) + return "dashboards: array expected"; + for (var i = 0; i < message.dashboards.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboards[i]); if (error) - return "thresholds." + error; + return "dashboards." + error; } } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); - if (error) - return "xAxis." + error; - } - if (message.yAxis != null && message.hasOwnProperty("yAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); - if (error) - return "yAxis." + error; - } - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { - var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); - if (error) - return "chartOptions." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse */ - XyChart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) + ListDashboardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsResponse) return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart(); - if (object.dataSets) { - if (!Array.isArray(object.dataSets)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); - message.dataSets = []; - for (var i = 0; i < object.dataSets.length; ++i) { - if (typeof object.dataSets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); - message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); - } - } - if (object.timeshiftDuration != null) { - if (typeof object.timeshiftDuration !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); - message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); - } - if (object.thresholds) { - if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); - message.thresholds = []; - for (var i = 0; i < object.thresholds.length; ++i) { - if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); - message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + if (object.dashboards) { + if (!Array.isArray(object.dashboards)) + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: array expected"); + message.dashboards = []; + for (var i = 0; i < object.dashboards.length; ++i) { + if (typeof object.dashboards[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: object expected"); + message.dashboards[i] = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboards[i]); } } - if (object.xAxis != null) { - if (typeof object.xAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); - } - if (object.yAxis != null) { - if (typeof object.yAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); - } - if (object.chartOptions != null) { - if (typeof object.chartOptions !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); - } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @static - * @param {google.monitoring.dashboard.v1.XyChart} message XyChart + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} message ListDashboardsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - XyChart.toObject = function toObject(message, options) { + ListDashboardsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dataSets = []; - object.thresholds = []; - } - if (options.defaults) { - object.timeshiftDuration = null; - object.xAxis = null; - object.yAxis = null; - object.chartOptions = null; - } - if (message.dataSets && message.dataSets.length) { - object.dataSets = []; - for (var j = 0; j < message.dataSets.length; ++j) - object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); - } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) - object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); - if (message.thresholds && message.thresholds.length) { - object.thresholds = []; - for (var j = 0; j < message.thresholds.length; ++j) - object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + if (options.arrays || options.defaults) + object.dashboards = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dashboards && message.dashboards.length) { + object.dashboards = []; + for (var j = 0; j < message.dashboards.length; ++j) + object.dashboards[j] = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboards[j], options); } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) - object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); - if (message.yAxis != null && message.hasOwnProperty("yAxis")) - object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) - object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this XyChart to JSON. + * Converts this ListDashboardsResponse to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse * @instance * @returns {Object.} JSON object */ - XyChart.prototype.toJSON = function toJSON() { + ListDashboardsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - XyChart.DataSet = (function() { - - /** - * Properties of a DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IDataSet - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery - * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType - * @property {string|null} [legendTemplate] DataSet legendTemplate - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod - */ - - /** - * Constructs a new DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents a DataSet. - * @implements IDataSet - * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set - */ - function DataSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSet timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.timeSeriesQuery = null; - - /** - * DataSet plotType. - * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.plotType = 0; - - /** - * DataSet legendTemplate. - * @member {string} legendTemplate - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.legendTemplate = ""; - - /** - * DataSet minAlignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.minAlignmentPeriod = null; - - /** - * Creates a new DataSet instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance - */ - DataSet.create = function create(properties) { - return new DataSet(properties); - }; + return ListDashboardsResponse; + })(); - /** - * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.plotType != null && Object.hasOwnProperty.call(message, "plotType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); - if (message.legendTemplate != null && Object.hasOwnProperty.call(message, "legendTemplate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); - if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + v1.GetDashboardRequest = (function() { - /** - * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a GetDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IGetDashboardRequest + * @property {string|null} [name] GetDashboardRequest name + */ - /** - * Decodes a DataSet message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 2: - message.plotType = reader.int32(); - break; - case 3: - message.legendTemplate = reader.string(); - break; - case 4: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new GetDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GetDashboardRequest. + * @implements IGetDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + */ + function GetDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a DataSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GetDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @instance + */ + GetDashboardRequest.prototype.name = ""; - /** - * Verifies a DataSet message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; - } - if (message.plotType != null && message.hasOwnProperty("plotType")) - switch (message.plotType) { - default: - return "plotType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - if (!$util.isString(message.legendTemplate)) - return "legendTemplate: string expected"; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); - if (error) - return "minAlignmentPeriod." + error; - } - return null; - }; + /** + * Creates a new GetDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest instance + */ + GetDashboardRequest.create = function create(properties) { + return new GetDashboardRequest(properties); + }; - /** - * Creates a DataSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - */ - DataSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); - } - switch (object.plotType) { - case "PLOT_TYPE_UNSPECIFIED": - case 0: - message.plotType = 0; - break; - case "LINE": + /** + * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDashboardRequest.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 GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.plotType = 1; - break; - case "STACKED_AREA": - case 2: - message.plotType = 2; - break; - case "STACKED_BAR": - case 3: - message.plotType = 3; + message.name = reader.string(); break; - case "HEATMAP": - case 4: - message.plotType = 4; + default: + reader.skipType(tag & 7); break; } - if (object.legendTemplate != null) - message.legendTemplate = String(object.legendTemplate); - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; - - /** - * Creates a plain object from a DataSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeSeriesQuery = null; - object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; - object.legendTemplate = ""; - object.minAlignmentPeriod = null; - } - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.plotType != null && message.hasOwnProperty("plotType")) - object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - object.legendTemplate = message.legendTemplate; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; - - /** - * Converts this DataSet to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - * @returns {Object.} JSON object - */ - DataSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * PlotType enum. - * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - * @enum {number} - * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value - * @property {number} LINE=1 LINE value - * @property {number} STACKED_AREA=2 STACKED_AREA value - * @property {number} STACKED_BAR=3 STACKED_BAR value - * @property {number} HEATMAP=4 HEATMAP value - */ - DataSet.PlotType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE"] = 1; - values[valuesById[2] = "STACKED_AREA"] = 2; - values[valuesById[3] = "STACKED_BAR"] = 3; - values[valuesById[4] = "HEATMAP"] = 4; - return values; - })(); + } + return message; + }; - return DataSet; - })(); + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - XyChart.Axis = (function() { + /** + * Verifies a GetDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDashboardRequest.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; + }; - /** - * Properties of an Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IAxis - * @property {string|null} [label] Axis label - * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale - */ + /** + * Creates a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + */ + GetDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GetDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Constructs a new Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents an Axis. - * @implements IAxis - * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - */ - function Axis(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.GetDashboardRequest} message GetDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDashboardRequest.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; + }; - /** - * Axis label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.label = ""; + /** + * Converts this GetDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + GetDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Axis scale. - * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.scale = 0; + return GetDashboardRequest; + })(); - /** - * Creates a new Axis instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance - */ - Axis.create = function create(properties) { - return new Axis(properties); - }; + v1.DeleteDashboardRequest = (function() { - /** - * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); - return writer; - }; + /** + * Properties of a DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IDeleteDashboardRequest + * @property {string|null} [name] DeleteDashboardRequest name + */ - /** - * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DeleteDashboardRequest. + * @implements IDeleteDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + */ + function DeleteDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an Axis message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.scale = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeleteDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @instance + */ + DeleteDashboardRequest.prototype.name = ""; - /** - * Decodes an Axis message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeleteDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest instance + */ + DeleteDashboardRequest.create = function create(properties) { + return new DeleteDashboardRequest(properties); + }; - /** - * Verifies an Axis message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Axis.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - switch (message.scale) { - default: - return "scale: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.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; + }; - /** - * Creates an Axis message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - */ - Axis.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - if (object.label != null) - message.label = String(object.label); - switch (object.scale) { - case "SCALE_UNSPECIFIED": - case 0: - message.scale = 0; - break; - case "LINEAR": - case 1: - message.scale = 1; - break; - case "LOG10": - case 2: - message.scale = 2; - break; - } - return message; - }; + /** + * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from an Axis message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Axis.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; - return object; - }; + } + return message; + }; - /** - * Converts this Axis to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - * @returns {Object.} JSON object - */ - Axis.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Scale enum. - * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale - * @enum {number} - * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value - * @property {number} LINEAR=1 LINEAR value - * @property {number} LOG10=2 LOG10 value - */ - Axis.Scale = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINEAR"] = 1; - values[valuesById[2] = "LOG10"] = 2; - return values; - })(); + /** + * Verifies a DeleteDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDashboardRequest.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; + }; - return Axis; - })(); + /** + * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + */ + DeleteDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.DeleteDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return XyChart; + /** + * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.DeleteDashboardRequest} message DeleteDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDashboardRequest.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 DeleteDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteDashboardRequest; })(); - v1.ChartOptions = (function() { + v1.UpdateDashboardRequest = (function() { /** - * Properties of a ChartOptions. + * Properties of an UpdateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @interface IChartOptions - * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode + * @interface IUpdateDashboardRequest + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] UpdateDashboardRequest dashboard */ /** - * Constructs a new ChartOptions. + * Constructs a new UpdateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ChartOptions. - * @implements IChartOptions + * @classdesc Represents an UpdateDashboardRequest. + * @implements IUpdateDashboardRequest * @constructor - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set */ - function ChartOptions(properties) { + function UpdateDashboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15559,75 +17635,75 @@ } /** - * ChartOptions mode. - * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * UpdateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @instance */ - ChartOptions.prototype.mode = 0; + UpdateDashboardRequest.prototype.dashboard = null; /** - * Creates a new ChartOptions instance using the specified properties. + * Creates a new UpdateDashboardRequest instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest instance */ - ChartOptions.create = function create(properties) { - return new ChartOptions(properties); + UpdateDashboardRequest.create = function create(properties) { + return new UpdateDashboardRequest(properties); }; /** - * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartOptions.encode = function encode(message, writer) { + UpdateDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChartOptions message from the specified reader or buffer. + * Decodes an UpdateDashboardRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartOptions.decode = function decode(reader, length) { + UpdateDashboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mode = reader.int32(); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15638,797 +17714,1016 @@ }; /** - * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartOptions.decodeDelimited = function decodeDelimited(reader) { + UpdateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChartOptions message. + * Verifies an UpdateDashboardRequest message. * @function verify - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChartOptions.verify = function verify(message) { + UpdateDashboardRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } return null; }; /** - * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions - */ - ChartOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) - return object; - var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "COLOR": - case 1: - message.mode = 1; - break; - case "X_RAY": - case 2: - message.mode = 2; - break; - case "STATS": - case 3: - message.mode = 3; - break; + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + */ + UpdateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.UpdateDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); } return message; }; /** - * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions + * @param {google.monitoring.dashboard.v1.UpdateDashboardRequest} message UpdateDashboardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChartOptions.toObject = function toObject(message, options) { + UpdateDashboardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; + object.dashboard = null; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); return object; }; /** - * Converts this ChartOptions to JSON. + * Converts this UpdateDashboardRequest to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.ChartOptions + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @instance * @returns {Object.} JSON object */ - ChartOptions.prototype.toJSON = function toJSON() { + UpdateDashboardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Mode enum. - * @name google.monitoring.dashboard.v1.ChartOptions.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} COLOR=1 COLOR value - * @property {number} X_RAY=2 X_RAY value - * @property {number} STATS=3 STATS value - */ - ChartOptions.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COLOR"] = 1; - values[valuesById[2] = "X_RAY"] = 2; - values[valuesById[3] = "STATS"] = 3; - return values; - })(); - - return ChartOptions; + return UpdateDashboardRequest; })(); - v1.DashboardsService = (function() { + return v1; + })(); - /** - * Constructs a new DashboardsService service. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a DashboardsService - * @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 DashboardsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + return dashboard; + })(); - (DashboardsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DashboardsService; + return monitoring; + })(); - /** - * Creates new DashboardsService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @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 {DashboardsService} RPC service. Useful where requests and/or responses are streamed. - */ - DashboardsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + google.api = (function() { - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef CreateDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; - /** - * Calls CreateDashboard. - * @function createDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.createDashboard = function createDashboard(request, callback) { - return this.rpcCall(createDashboard, $root.google.monitoring.dashboard.v1.CreateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "CreateDashboard" }); + api.Distribution = (function() { - /** - * Calls CreateDashboard. - * @function createDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef ListDashboardsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} [response] ListDashboardsResponse - */ + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Calls ListDashboards. - * @function listDashboards - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback} callback Node-style callback called with the error, if any, and ListDashboardsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.listDashboards = function listDashboards(request, callback) { - return this.rpcCall(listDashboards, $root.google.monitoring.dashboard.v1.ListDashboardsRequest, $root.google.monitoring.dashboard.v1.ListDashboardsResponse, request, callback); - }, "name", { value: "ListDashboards" }); + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Calls ListDashboards. - * @function listDashboards - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef GetDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; - /** - * Calls GetDashboard. - * @function getDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.getDashboard = function getDashboard(request, callback) { - return this.rpcCall(getDashboard, $root.google.monitoring.dashboard.v1.GetDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "GetDashboard" }); + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; - /** - * Calls GetDashboard. - * @function getDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef DeleteDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; - /** - * Calls DeleteDashboard. - * @function deleteDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.deleteDashboard = function deleteDashboard(request, callback) { - return this.rpcCall(deleteDashboard, $root.google.monitoring.dashboard.v1.DeleteDashboardRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDashboard" }); + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Calls DeleteDashboard. - * @function deleteDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef UpdateDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function 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.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls UpdateDashboard. - * @function updateDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.updateDashboard = function updateDashboard(request, callback) { - return this.rpcCall(updateDashboard, $root.google.monitoring.dashboard.v1.UpdateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "UpdateDashboard" }); + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls UpdateDashboard. - * @function updateDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; - return DashboardsService; - })(); + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; - v1.CreateDashboardRequest = (function() { + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; - /** - * Properties of a CreateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface ICreateDashboardRequest - * @property {string|null} [parent] CreateDashboardRequest parent - * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] CreateDashboardRequest dashboard - */ + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new CreateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a CreateDashboardRequest. - * @implements ICreateDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set - */ - function CreateDashboardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Distribution.Range = (function() { - /** - * CreateDashboardRequest parent. - * @member {string} parent - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - */ - CreateDashboardRequest.prototype.parent = ""; + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ - /** - * CreateDashboardRequest dashboard. - * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - */ - CreateDashboardRequest.prototype.dashboard = null; + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (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 CreateDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest instance - */ - CreateDashboardRequest.create = function create(properties) { - return new CreateDashboardRequest(properties); - }; + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; - /** - * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDashboardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; - /** - * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a CreateDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDashboardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); - if (error) - return "dashboard." + error; + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function 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.Distribution.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - */ - CreateDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.CreateDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dashboard != null) { - if (typeof object.dashboard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard: object expected"); - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); - } - return message; - }; + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.CreateDashboardRequest} message CreateDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDashboardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dashboard = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) - object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); + /** + * Verifies a Range message. + * @function verify + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) return object; - }; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; - /** - * Converts this CreateDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + return object; + }; - return CreateDashboardRequest; - })(); + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.api.Distribution.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.ListDashboardsRequest = (function() { + return Range; + })(); - /** - * Properties of a ListDashboardsRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IListDashboardsRequest - * @property {string|null} [parent] ListDashboardsRequest parent - * @property {number|null} [pageSize] ListDashboardsRequest pageSize - * @property {string|null} [pageToken] ListDashboardsRequest pageToken - */ + Distribution.BucketOptions = (function() { - /** - * Constructs a new ListDashboardsRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ListDashboardsRequest. - * @implements IListDashboardsRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set - */ - function ListDashboardsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ - /** - * ListDashboardsRequest parent. - * @member {string} parent - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.parent = ""; + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; - /** - * ListDashboardsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.pageSize = 0; + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; - /** - * ListDashboardsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.pageToken = ""; + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; - /** - * Creates a new ListDashboardsRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest instance - */ - ListDashboardsRequest.create = function create(properties) { - return new ListDashboardsRequest(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a ListDashboardsRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDashboardsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function 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.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - */ - ListDashboardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.ListDashboardsRequest} message ListDashboardsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDashboardsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) return object; - }; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; - /** - * Converts this ListDashboardsRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDashboardsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; - return ListDashboardsRequest; - })(); + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.ListDashboardsResponse = (function() { + BucketOptions.Linear = (function() { /** - * Properties of a ListDashboardsResponse. - * @memberof google.monitoring.dashboard.v1 - * @interface IListDashboardsResponse - * @property {Array.|null} [dashboards] ListDashboardsResponse dashboards - * @property {string|null} [nextPageToken] ListDashboardsResponse nextPageToken + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset */ /** - * Constructs a new ListDashboardsResponse. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ListDashboardsResponse. - * @implements IListDashboardsResponse + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear * @constructor - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set */ - function ListDashboardsResponse(properties) { - this.dashboards = []; + function Linear(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16436,91 +18731,101 @@ } /** - * ListDashboardsResponse dashboards. - * @member {Array.} dashboards - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear * @instance */ - ListDashboardsResponse.prototype.dashboards = $util.emptyArray; + Linear.prototype.numFiniteBuckets = 0; /** - * ListDashboardsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear * @instance */ - ListDashboardsResponse.prototype.nextPageToken = ""; + Linear.prototype.width = 0; /** - * Creates a new ListDashboardsResponse instance using the specified properties. + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; + + /** + * Creates a new Linear instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse instance + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance */ - ListDashboardsResponse.create = function create(properties) { - return new ListDashboardsResponse(properties); + Linear.create = function create(properties) { + return new Linear(properties); }; /** - * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDashboardsResponse.encode = function encode(message, writer) { + Linear.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dashboards != null && message.dashboards.length) - for (var i = 0; i < message.dashboards.length; ++i) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); return writer; }; /** - * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDashboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + Linear.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDashboardsResponse message from the specified reader or buffer. + * Decodes a Linear message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @returns {google.api.Distribution.BucketOptions.Linear} Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDashboardsResponse.decode = function decode(reader, length) { + Linear.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.dashboards && message.dashboards.length)) - message.dashboards = []; - message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); + message.numFiniteBuckets = reader.int32(); break; case 2: - message.nextPageToken = reader.string(); + message.width = reader.double(); + break; + case 3: + message.offset = reader.double(); break; default: reader.skipType(tag & 7); @@ -16531,133 +18836,126 @@ }; /** - * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. + * Decodes a Linear message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @returns {google.api.Distribution.BucketOptions.Linear} Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDashboardsResponse.decodeDelimited = function decodeDelimited(reader) { + Linear.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDashboardsResponse message. + * Verifies a Linear message. * @function verify - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDashboardsResponse.verify = function verify(message) { + Linear.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dashboards != null && message.hasOwnProperty("dashboards")) { - if (!Array.isArray(message.dashboards)) - return "dashboards: array expected"; - for (var i = 0; i < message.dashboards.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboards[i]); - if (error) - return "dashboards." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; return null; }; /** - * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Linear message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @returns {google.api.Distribution.BucketOptions.Linear} Linear */ - ListDashboardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsResponse) + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) return object; - var message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); - if (object.dashboards) { - if (!Array.isArray(object.dashboards)) - throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: array expected"); - message.dashboards = []; - for (var i = 0; i < object.dashboards.length; ++i) { - if (typeof object.dashboards[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: object expected"); - message.dashboards[i] = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboards[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); return message; }; /** - * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. + * Creates a plain object from a Linear message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} message ListDashboardsResponse + * @param {google.api.Distribution.BucketOptions.Linear} message Linear * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDashboardsResponse.toObject = function toObject(message, options) { + Linear.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dashboards = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.dashboards && message.dashboards.length) { - object.dashboards = []; - for (var j = 0; j < message.dashboards.length; ++j) - object.dashboards[j] = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboards[j], options); + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; return object; }; /** - * Converts this ListDashboardsResponse to JSON. + * Converts this Linear to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @memberof google.api.Distribution.BucketOptions.Linear * @instance * @returns {Object.} JSON object */ - ListDashboardsResponse.prototype.toJSON = function toJSON() { + Linear.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDashboardsResponse; + return Linear; })(); - v1.GetDashboardRequest = (function() { + BucketOptions.Exponential = (function() { /** - * Properties of a GetDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IGetDashboardRequest - * @property {string|null} [name] GetDashboardRequest name + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale */ /** - * Constructs a new GetDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GetDashboardRequest. - * @implements IGetDashboardRequest + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential * @constructor - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set */ - function GetDashboardRequest(properties) { + function Exponential(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16665,75 +18963,101 @@ } /** - * GetDashboardRequest name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential * @instance */ - GetDashboardRequest.prototype.name = ""; + Exponential.prototype.numFiniteBuckets = 0; /** - * Creates a new GetDashboardRequest instance using the specified properties. + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; + + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; + + /** + * Creates a new Exponential instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest instance + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance */ - GetDashboardRequest.create = function create(properties) { - return new GetDashboardRequest(properties); + Exponential.create = function create(properties) { + return new Exponential(properties); }; /** - * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDashboardRequest.encode = function encode(message, writer) { + Exponential.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.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); return writer; }; /** - * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + Exponential.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDashboardRequest message from the specified reader or buffer. + * Decodes an Exponential message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDashboardRequest.decode = function decode(reader, length) { + Exponential.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); break; default: reader.skipType(tag & 7); @@ -16744,107 +19068,125 @@ }; /** - * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. + * Decodes an Exponential message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + Exponential.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDashboardRequest message. + * Verifies an Exponential message. * @function verify - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDashboardRequest.verify = function verify(message) { + Exponential.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.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; return null; }; /** - * Creates a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential */ - GetDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GetDashboardRequest) + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) return object; - var message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); return message; }; /** - * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * Creates a plain object from an Exponential message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @static - * @param {google.monitoring.dashboard.v1.GetDashboardRequest} message GetDashboardRequest + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDashboardRequest.toObject = function toObject(message, options) { + Exponential.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; return object; }; /** - * Converts this GetDashboardRequest to JSON. + * Converts this Exponential to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Exponential * @instance * @returns {Object.} JSON object */ - GetDashboardRequest.prototype.toJSON = function toJSON() { + Exponential.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDashboardRequest; + return Exponential; })(); - v1.DeleteDashboardRequest = (function() { + BucketOptions.Explicit = (function() { /** - * Properties of a DeleteDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IDeleteDashboardRequest - * @property {string|null} [name] DeleteDashboardRequest name + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds */ /** - * Constructs a new DeleteDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a DeleteDashboardRequest. - * @implements IDeleteDashboardRequest + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit * @constructor - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set */ - function DeleteDashboardRequest(properties) { + function Explicit(properties) { + this.bounds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16852,75 +19194,86 @@ } /** - * DeleteDashboardRequest name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit * @instance */ - DeleteDashboardRequest.prototype.name = ""; + Explicit.prototype.bounds = $util.emptyArray; /** - * Creates a new DeleteDashboardRequest instance using the specified properties. + * Creates a new Explicit instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest instance + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance */ - DeleteDashboardRequest.create = function create(properties) { - return new DeleteDashboardRequest(properties); + Explicit.create = function create(properties) { + return new Explicit(properties); }; /** - * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDashboardRequest.encode = function encode(message, writer) { + Explicit.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.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + Explicit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * Decodes an Explicit message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDashboardRequest.decode = function decode(reader, length) { + Explicit.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); break; default: reader.skipType(tag & 7); @@ -16931,319 +19284,945 @@ }; /** - * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * Decodes an Explicit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + Explicit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDashboardRequest message. + * Verifies an Explicit message. * @function verify - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDashboardRequest.verify = function verify(message) { + Explicit.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.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } return null; }; /** - * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit */ - DeleteDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.DeleteDashboardRequest) + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) return object; - var message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); + } return message; }; - /** - * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.DeleteDashboardRequest} message DeleteDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDashboardRequest.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; - }; + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; + } + return object; + }; + + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Explicit; + })(); + + return BucketOptions; + })(); + + Distribution.Exemplar = (function() { + + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ + + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; + + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; + + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; + + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.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); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function 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.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.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"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; + + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; + }; + + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Exemplar; + })(); + + return Distribution; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.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 + */ + + /** + * 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 = []; + if (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 = ""; - /** - * Converts this DeleteDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; - return DeleteDashboardRequest; - })(); + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; - v1.UpdateDashboardRequest = (function() { + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; - /** - * Properties of an UpdateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IUpdateDashboardRequest - * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] UpdateDashboardRequest dashboard - */ + /** + * 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); + }; - /** - * Constructs a new UpdateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents an UpdateDashboardRequest. - * @implements IUpdateDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set - */ - function UpdateDashboardRequest(properties) { - if (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 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); + return writer; + }; - /** - * UpdateDashboardRequest dashboard. - * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @instance - */ - UpdateDashboardRequest.prototype.dashboard = null; + /** + * 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(); + }; - /** - * Creates a new UpdateDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest instance - */ - UpdateDashboardRequest.create = function create(properties) { - return new UpdateDashboardRequest(properties); - }; + /** + * 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDashboardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * 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()); + }; - /** - * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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"; + return null; + }; - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + 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 = []; + 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; + return object; + }; - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies an UpdateDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDashboardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); - if (error) - return "dashboard." + error; - } - return null; - }; + /** + * 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; + })(); - /** - * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - */ - UpdateDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.UpdateDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); - if (object.dashboard != null) { - if (typeof object.dashboard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard: object expected"); - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); - } - return message; - }; + return ResourceDescriptor; + })(); - /** - * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.UpdateDashboardRequest} message UpdateDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDashboardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dashboard = null; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) - object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); - return object; - }; + api.ResourceReference = (function() { - /** - * Converts this UpdateDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ - return UpdateDashboardRequest; - })(); + /** + * 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]]; + } - return v1; - })(); + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - return dashboard; - })(); + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; - return monitoring; - })(); + /** + * 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); + }; - google.api = (function() { + /** + * 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; + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * 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(); + }; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; + /** + * 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.Http = (function() { diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 48b9231dd9d..17033db61d2 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -13,6 +13,30 @@ "optimize_for": "SPEED" }, "nested": { + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Duration": { "fields": { "seconds": { @@ -930,10 +954,10 @@ "v1": { "options": { "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", - "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1", "java_multiple_files": true, "java_outer_classname": "ServiceMonitoringProto", - "java_package": "com.google.monitoring.dashboard.v1" + "java_package": "com.google.monitoring.dashboard.v1", + "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1" }, "nested": { "Aggregation": { @@ -1056,6 +1080,10 @@ } }, "Dashboard": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/Dashboard", + "(google.api.resource).pattern": "projects/{project}/dashboards/{dashboard}" + }, "oneofs": { "layout": { "oneof": [ @@ -1068,11 +1096,17 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "displayName": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "etag": { "type": "string", @@ -1202,7 +1236,10 @@ "fields": { "timeSeriesQuery": { "type": "TimeSeriesQuery", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "gaugeView": { "type": "GaugeView", @@ -1235,7 +1272,10 @@ "fields": { "sparkChartType": { "type": "SparkChartType", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "minAlignmentPeriod": { "type": "google.protobuf.Duration", @@ -1250,7 +1290,8 @@ "source": { "oneof": [ "timeSeriesFilter", - "timeSeriesFilterRatio" + "timeSeriesFilterRatio", + "timeSeriesQueryLanguage" ] } }, @@ -1263,6 +1304,10 @@ "type": "TimeSeriesFilterRatio", "id": 2 }, + "timeSeriesQueryLanguage": { + "type": "string", + "id": 3 + }, "unitOverride": { "type": "string", "id": 5 @@ -1290,13 +1335,20 @@ "type": "Aggregation", "id": 2 }, + "secondaryAggregation": { + "type": "Aggregation", + "id": 3 + }, "pickTimeSeriesFilter": { "type": "PickTimeSeriesFilter", "id": 4 }, "statisticalTimeSeriesFilter": { "type": "StatisticalTimeSeriesFilter", - "id": 5 + "id": 5, + "options": { + "deprecated": true + } } } }, @@ -1328,7 +1380,10 @@ }, "statisticalTimeSeriesFilter": { "type": "StatisticalTimeSeriesFilter", - "id": 5 + "id": 5, + "options": { + "deprecated": true + } } }, "nested": { @@ -1418,7 +1473,10 @@ "dataSets": { "rule": "repeated", "type": "DataSet", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "timeshiftDuration": { "type": "google.protobuf.Duration", @@ -1447,7 +1505,10 @@ "fields": { "timeSeriesQuery": { "type": "TimeSeriesQuery", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "plotType": { "type": "PlotType", @@ -1587,7 +1648,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" } }, "pageSize": { @@ -1619,7 +1681,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" } } } @@ -1630,7 +1693,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" } } } @@ -1662,6 +1726,139 @@ "cc_enable_arenas": true }, "nested": { + "Distribution": { + "fields": { + "count": { + "type": "int64", + "id": 1 + }, + "mean": { + "type": "double", + "id": 2 + }, + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 + }, + "range": { + "type": "Range", + "id": 4 + }, + "bucketOptions": { + "type": "BucketOptions", + "id": 6 + }, + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 + } + }, + "nested": { + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, + "fields": { + "linearBuckets": { + "type": "Linear", + "id": 1 + }, + "exponentialBuckets": { + "type": "Exponential", + "id": 2 + }, + "explicitBuckets": { + "type": "Explicit", + "id": 3 + } + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "width": { + "type": "double", + "id": 2 + }, + "offset": { + "type": "double", + "id": 3 + } + } + }, + "Exponential": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "growthFactor": { + "type": "double", + "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } + }, + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } + } + } + }, + "Exemplar": { + "fields": { + "value": { + "type": "double", + "id": 1 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -1678,6 +1875,72 @@ "IMMUTABLE": 5 } }, + "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 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 30f1d1d4ea7..6e1e0b7e493 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -55,6 +55,7 @@ export class DashboardsServiceClient { batching: {}, }; innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; dashboardsServiceStub?: Promise<{[name: string]: Function}>; /** @@ -156,6 +157,15 @@ export class DashboardsServiceClient { : nodejsProtoPath ); + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + dashboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/dashboards/{dashboard}' + ), + }; + // 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. @@ -344,9 +354,11 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. The {project_id_or_number} must match - * the dashboard resource name. + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard * Required. The initial dashboard specification. * @param {object} [options] @@ -440,10 +452,11 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the Dashboard. The format is one of - * `"dashboards/{dashboard_id}"` (for system dashboards) or - * `"projects/{project_id_or_number}/dashboards/{dashboard_id}"` - * (for custom dashboards). + * Required. The resource name of the Dashboard. The format is one of: + * + * - `dashboards/[DASHBOARD_ID]` (for system dashboards) + * - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` + * (for custom dashboards). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -535,8 +548,9 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the Dashboard. The format is - * `"projects/{project_id_or_number}/dashboards/{dashboard_id}"`. + * Required. The resource name of the Dashboard. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_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. @@ -721,8 +735,9 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The scope of the dashboards to list. A project scope must be - * specified in the form of `"projects/{project_id_or_number}"`. + * Required. The scope of the dashboards to list. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * A positive number that is the maximum number of results to return. * If unspecified, a default of 1000 is used. @@ -809,8 +824,9 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The scope of the dashboards to list. A project scope must be - * specified in the form of `"projects/{project_id_or_number}"`. + * Required. The scope of the dashboards to list. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * A positive number that is the maximum number of results to return. * If unspecified, a default of 1000 is used. @@ -853,8 +869,9 @@ export class DashboardsServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The scope of the dashboards to list. A project scope must be - * specified in the form of `"projects/{project_id_or_number}"`. + * Required. The scope of the dashboards to list. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * A positive number that is the maximum number of results to return. * If unspecified, a default of 1000 is used. @@ -889,6 +906,47 @@ export class DashboardsServiceClient { callSettings ) as AsyncIterable; } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified dashboard resource name string. + * + * @param {string} project + * @param {string} dashboard + * @returns {string} Resource name string. + */ + dashboardPath(project: string, dashboard: string) { + return this.pathTemplates.dashboardPathTemplate.render({ + project: project, + dashboard: dashboard, + }); + } + + /** + * Parse the project from Dashboard resource. + * + * @param {string} dashboardName + * A fully-qualified path representing Dashboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDashboardName(dashboardName: string) { + return this.pathTemplates.dashboardPathTemplate.match(dashboardName) + .project; + } + + /** + * Parse the dashboard from Dashboard resource. + * + * @param {string} dashboardName + * A fully-qualified path representing Dashboard resource. + * @returns {string} A string representing the dashboard. + */ + matchDashboardFromDashboardName(dashboardName: string) { + return this.pathTemplates.dashboardPathTemplate.match(dashboardName) + .dashboard; + } /** * Terminate the GRPC channel and close the client. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 493abbca05d..a259efbbcd3 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "80dcc9c7a603e9612bae5536f6e1f0f71de8b702" + "sha": "33c441c0484cdc0e09203ad033e220ac57324607" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "83816bb3093686a28af2891db5b7506614a820b1", - "internalRef": "310509915" + "sha": "3c5166c1db0f1804af7acdbbd79137630a00ce63", + "internalRef": "315496921" } }, { diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 541b08910e4..824c78d4e23 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -960,4 +960,55 @@ describe('v1.DashboardsServiceClient', () => { ); }); }); + + describe('Path templates', () => { + describe('dashboard', () => { + const fakePath = '/rendered/path/dashboard'; + const expectedParameters = { + project: 'projectValue', + dashboard: 'dashboardValue', + }; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dashboardPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dashboardPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dashboardPath', () => { + const result = client.dashboardPath('projectValue', 'dashboardValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dashboardPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDashboardName', () => { + const result = client.matchProjectFromDashboardName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dashboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDashboardFromDashboardName', () => { + const result = client.matchDashboardFromDashboardName(fakePath); + assert.strictEqual(result, 'dashboardValue'); + assert( + (client.pathTemplates.dashboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); }); From d5a6d584463f816090f9c6c0b064475526970109 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 22 Jun 2020 10:12:30 -0700 Subject: [PATCH 061/181] fix: update node issue template (#93) Source-Author: Stephen Source-Date: Wed Jun 17 14:16:18 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: b10590a4a1568548dd13cfcea9aa11d40898144b Source-Link: https://github.com/googleapis/synthtool/commit/b10590a4a1568548dd13cfcea9aa11d40898144b Co-authored-by: Justin Beckwith --- packages/google-monitoring-dashboard/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index a259efbbcd3..65dc754b474 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From b21f8393c7fe0e1dd83c32f4ce02f83098cf4cab Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:46:46 -0700 Subject: [PATCH 062/181] build: add config .gitattributes (#94) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2a81bca4-7abd-4108-ac1f-21340f858709/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 --- packages/google-monitoring-dashboard/.gitattributes | 3 +++ packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packages/google-monitoring-dashboard/.gitattributes diff --git a/packages/google-monitoring-dashboard/.gitattributes b/packages/google-monitoring-dashboard/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/packages/google-monitoring-dashboard/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 65dc754b474..3e87353fd08 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "33c441c0484cdc0e09203ad033e220ac57324607" + "sha": "e561059ddba9b46cec6ae14fe3d522a83ef231ca" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From b2c2771cb676693aa086549ec2c1e83a2bdc482e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2020 15:02:00 -0700 Subject: [PATCH 063/181] chore: release 2.1.0 (#88) --- packages/google-monitoring-dashboard/CHANGELOG.md | 14 ++++++++++++++ packages/google-monitoring-dashboard/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 31b496e1da1..93c3ffa3d3c 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.1.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.0.0...v2.1.0) (2020-06-28) + + +### Features + +* Add support for secondary_aggregation and Monitoring Query Language ([#92](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/92)) ([af186dc](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/af186dc51be796e8c8ce83cfdc75e8b7f8017694)) +* move ts target to es2018 from es2016 ([#87](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/87)) ([846ff12](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/846ff12d5a3858cd4c91cb4fcf835b40d5f9b03e)) + + +### Bug Fixes + +* proper fallback option handling ([33c441c](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/33c441c0484cdc0e09203ad033e220ac57324607)) +* update node issue template ([#93](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/93)) ([e561059](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/e561059ddba9b46cec6ae14fe3d522a83ef231ca)) + ## [2.0.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v1.3.0...v2.0.0) (2020-05-08) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 2bcb7297bdf..8b5ba1e7e24 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.0.0", + "version": "2.1.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 8e3d87e94b6..8e07d891796 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.0.0" + "@google-cloud/monitoring-dashboards": "^2.1.0" }, "devDependencies": { "c8": "^7.0.0", From 6d0ad446dda1a2c0de65e8bfcc0cd66cafe3b165 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:18:01 -0700 Subject: [PATCH 064/181] build: use bazel build (#95) --- .../src/v1/dashboards_service_client.ts | 26 +++++++++++++ .../v1/dashboards_service_client_config.json | 26 +++++++++++-- .../synth.metadata | 18 +++------ packages/google-monitoring-dashboard/synth.py | 10 +---- .../test/gapic_dashboards_service_v1.ts | 38 +++++++++++++++++++ 5 files changed, 93 insertions(+), 25 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 6e1e0b7e493..51a8480a3ea 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -164,6 +164,9 @@ export class DashboardsServiceClient { dashboardPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/dashboards/{dashboard}' ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), }; // Some of the methods on this service return "paged" results, @@ -948,6 +951,29 @@ export class DashboardsServiceClient { .dashboard; } + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json index 5ed805f20f6..1b2f284ce9f 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client_config.json @@ -6,6 +6,10 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "UNAVAILABLE" ] }, "retry_params": { @@ -17,26 +21,40 @@ "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 } }, "methods": { "CreateDashboard": { + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListDashboards": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 30000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, "GetDashboard": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 30000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, "DeleteDashboard": { + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateDashboard": { + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 3e87353fd08..0d677a1b439 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "e561059ddba9b46cec6ae14fe3d522a83ef231ca" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3c5166c1db0f1804af7acdbbd79137630a00ce63", - "internalRef": "315496921" + "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", + "sha": "471cca6caba1c6d98962075a3bc17dc23f234dcc" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "monitoring-dashboard", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/synth.py index c33385c3fa4..d5973bd8826 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/synth.py @@ -24,16 +24,10 @@ # run the gapic generator -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1'] for version in versions: - library = gapic.typescript_library( - 'monitoring-dashboard', - generator_args={ - 'package-name': '@google-cloud/monitoring-dashboards' - }, - proto_path='/google/monitoring/dashboard/v1', - version=version) + library = gapic.node_library('monitoring-dashboard', version, proto_path='google/monitoring/dashboard/v1') s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 824c78d4e23..816a8534e26 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -1010,5 +1010,43 @@ describe('v1.DashboardsServiceClient', () => { ); }); }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); From a24ef1638741d61a82d273ea54c790b402c1d6d7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 17:50:45 -0700 Subject: [PATCH 065/181] build: typeo in nodejs .gitattribute (#98) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc99acfa-05b8-434b-9500-2f6faf2eaa02/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- .../google-monitoring-dashboard/.gitattributes | 2 +- .../google-monitoring-dashboard/synth.metadata | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/.gitattributes b/packages/google-monitoring-dashboard/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-monitoring-dashboard/.gitattributes +++ b/packages/google-monitoring-dashboard/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 0d677a1b439..fd10ff60555 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", - "sha": "471cca6caba1c6d98962075a3bc17dc23f234dcc" + "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", + "sha": "df81531b73992963828e50f979777618cdfb118e" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From 64f4bb71e97beb0955802a658866d7ce093019e1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jul 2020 18:51:22 +0200 Subject: [PATCH 066/181] chore(deps): update dependency ts-loader to v8 (#97) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/ts-loader/7.0.5/8.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v8.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v800) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0) - [Support for symlinks in project references](https://togithub.com/TypeStrong/ts-loader/pull/1136) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - `ts-loader` now supports TypeScript 3.6 and greater **BREAKING CHANGE**
--- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 8b5ba1e7e24..f166241e852 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -43,7 +43,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^7.0.0", + "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10" From daf089ca758613737e85b420cf3702edc049b980 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:49:47 +0200 Subject: [PATCH 067/181] chore(deps): update dependency @types/mocha to v8 (#99) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/8.0.0) | --- ### Renovate 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#googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index f166241e852..8ffc1abedcb 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -30,7 +30,7 @@ "google-gax": "^2.1.0" }, "devDependencies": { - "@types/mocha": "^7.0.0", + "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", From 99eb8f0fcd37a0431f4381c92b1424f59de36869 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 Jul 2020 10:28:59 -0700 Subject: [PATCH 068/181] chore: delete node 8 test templates --- packages/google-monitoring-dashboard/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index fd10ff60555..faa23604d31 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "df81531b73992963828e50f979777618cdfb118e" + "sha": "c90eefe09715e5f4aba7606f92b7d610389af228" } }, { From 354811be2c1ed0a6a327ea8e17190d6937707bbd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 16:26:15 -0700 Subject: [PATCH 069/181] build: missing closing paren in publish script, delete template for Node 8, add config files for cloud-rad (#104) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5b03461e-47c0-40e8-a8ad-c465ee146cc5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/21f1470ecd01424dc91c70f1a7c798e4e87d1eec Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a Source-Link: https://github.com/googleapis/synthtool/commit/d82deccf657a66e31bd5da9efdb96c6fa322fc7e --- .../api-extractor.json | 369 ++++++++++++++++++ .../synth.metadata | 2 +- 2 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 packages/google-monitoring-dashboard/api-extractor.json diff --git a/packages/google-monitoring-dashboard/api-extractor.json b/packages/google-monitoring-dashboard/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index faa23604d31..1eda843fbec 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From a68a4f1756028ffb927bb4761550c95b96c50f3a Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:46:29 -0400 Subject: [PATCH 070/181] chore: add dev dependencies for cloud-rad ref docs (#105) --- packages/google-monitoring-dashboard/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 8ffc1abedcb..16dff96ea6c 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -24,7 +24,9 @@ "test": "c8 mocha build/test", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "precompile": "gts clean", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { "google-gax": "^2.1.0" @@ -46,7 +48,9 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" + "webpack-cli": "^3.3.10", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" }, "engines": { "node": ">=10" From ccee2ef97b3ed7074f0b5680db41f6737120a876 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Jul 2020 17:17:57 -0700 Subject: [PATCH 071/181] build: rename _toc to toc (#106) Source-Author: F. Hinkelmann Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 1eda843fbec..f7bd13811c6 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "c90eefe09715e5f4aba7606f92b7d610389af228" + "sha": "dbeb9afabb251b3a76e644b6da1e796987460f14" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From 571c86ae1e1ca183b9d195fcf98999ac1d89c3fb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 21:13:18 -0700 Subject: [PATCH 072/181] fix: move gitattributes files to node templates (#107) Source-Author: F. Hinkelmann Source-Date: Thu Jul 23 01:45:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 --- packages/google-monitoring-dashboard/.gitattributes | 1 + packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/.gitattributes b/packages/google-monitoring-dashboard/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/packages/google-monitoring-dashboard/.gitattributes +++ b/packages/google-monitoring-dashboard/.gitattributes @@ -1,3 +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-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index f7bd13811c6..0ee3d7523ad 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "dbeb9afabb251b3a76e644b6da1e796987460f14" + "sha": "55f4a5f2c8b37487d9271ac6fff65221910ee3d9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From a8d6543cbdad0dd4301d1cffe44d19c3fbc7b28f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:16:19 -0700 Subject: [PATCH 073/181] chore: release 2.1.1 (#108) * chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 93c3ffa3d3c..b63eab34f1a 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.1.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.0...v2.1.1) (2020-07-24) + + +### Bug Fixes + +* move gitattributes files to node templates ([#107](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/107)) ([7e7a729](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/7e7a729686b59354a255ca4da86b34c0e06523df)) + ## [2.1.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.0.0...v2.1.0) (2020-06-28) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 16dff96ea6c..2a2c9cce1d7 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.1.0", + "version": "2.1.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 8e07d891796..cb2581f8091 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.1.0" + "@google-cloud/monitoring-dashboards": "^2.1.1" }, "devDependencies": { "c8": "^7.0.0", From 66c1223d983ae528fd2a2973347c8bb85d5326d1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 16:36:12 -0700 Subject: [PATCH 074/181] chore(node): fix kokoro build path for cloud-rad (#109) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4bdc1826-2f69-49f1-a63b-94f99cceb5ee/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 0ee3d7523ad..ee51371c383 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "55f4a5f2c8b37487d9271ac6fff65221910ee3d9" + "sha": "bfa6a84b806491f7dc9a2726384e8054d4d65e1a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From 5b1221f2235823013b3663e16af4e518ecc94adb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:10:35 -0700 Subject: [PATCH 075/181] build: update protos (#110) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b205fd33-200c-4298-88b8-18b0d1c79a3e/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-monitoring-dashboard/protos/protos.d.ts | 2 +- packages/google-monitoring-dashboard/protos/protos.js | 2 +- packages/google-monitoring-dashboard/synth.metadata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index e8664abe28b..74f82d1c76a 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 1ed60570dc4..976c0261fac 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/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("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index ee51371c383..84111aa0518 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "bfa6a84b806491f7dc9a2726384e8054d4d65e1a" + "sha": "d6d4f2358400e752bc49ff2ce1290c39248890a4" } }, { From 38914d65d8c7eebba65b5d36992ce28460f8f75a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 2 Aug 2020 21:54:11 -0700 Subject: [PATCH 076/181] docs: add links to the CHANGELOG from the README.md for Java and Node (#111) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5936421202fb53ed4641bcb824017dd393a3dbcc --- packages/google-monitoring-dashboard/README.md | 3 +++ packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index cdfea8a2950..cf19c6d45a5 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -14,6 +14,9 @@ interact with dashboards for viewing and analyzing metric data +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/CHANGELOG.md). + * [Monitoring Dashboards Node.js Client API Reference][client-docs] * [Monitoring Dashboards Documentation][product-docs] * [github.com/googleapis/nodejs-monitoring-dashboards](https://github.com/googleapis/nodejs-monitoring-dashboards) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 84111aa0518..8b1232673a8 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "d6d4f2358400e752bc49ff2ce1290c39248890a4" + "sha": "c9a8c46b09fa062f888e52783b2803a0fba58c30" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 9fef2686e62f05626a54734f881b84a5bd3620b3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Aug 2020 10:56:14 -0700 Subject: [PATCH 077/181] build: --credential-file-override is no longer required (#113) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 8b1232673a8..830237f54bb 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "c9a8c46b09fa062f888e52783b2803a0fba58c30" + "sha": "974a232fb1e5bce991be4cca77ec2e685706c5cd" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From 85579de865dcf0ce38ab8c33a4d956447477dafa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 12:36:14 -0700 Subject: [PATCH 078/181] chore: update cloud rad kokoro build job (#115) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 830237f54bb..2c3a2caa58c 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "974a232fb1e5bce991be4cca77ec2e685706c5cd" + "sha": "57fc6925668ab39005223d42aa91a0f700727e4e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From f4022c7b999ddf64432fb933c1dcd3b2fef2816a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 12:58:14 -0700 Subject: [PATCH 079/181] build: use gapic-generator-typescript v1.0.7. (#114) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 325949033 Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- .../src/v1/dashboards_service_client.ts | 5 ++--- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 51a8480a3ea..76b5db78909 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -247,12 +247,11 @@ export class DashboardsServiceClient { } ); + const descriptor = this.descriptors.page[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 2c3a2caa58c..b72e3ca966c 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From 23ef38e52c2635e138ede0baf421933c03de5065 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 12:40:23 -0700 Subject: [PATCH 080/181] build: perform publish using Node 12 (#116) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/c36c6dbc-ab79-4f17-b70b-523b420b2a70/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5747555f7620113d9a2078a48f4c047a99d31b3e --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index b72e3ca966c..932a4e2d037 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "57fc6925668ab39005223d42aa91a0f700727e4e" + "sha": "5b002c5f10f23c29ee571f013b965989bd5d69e0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From e00c3ae9f4c826462fdd3f369703e26715fd64e4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 22:08:25 -0700 Subject: [PATCH 081/181] chore: start tracking obsolete files --- .../synth.metadata | 89 ++++++++++++++++++- 1 file changed, 85 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 932a4e2d037..6c8069509f1 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "5b002c5f10f23c29ee571f013b965989bd5d69e0" + "sha": "1e010dbd22d50d48f1735aed92f0d0a1ec6ab307" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", - "internalRef": "325949033" + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" } } ], @@ -33,5 +33,86 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.3488278276", + "protos/google/monitoring/dashboard/v1/common.proto", + "protos/google/monitoring/dashboard/v1/dashboard.proto", + "protos/google/monitoring/dashboard/v1/dashboards_service.proto", + "protos/google/monitoring/dashboard/v1/drilldowns.proto", + "protos/google/monitoring/dashboard/v1/layouts.proto", + "protos/google/monitoring/dashboard/v1/metrics.proto", + "protos/google/monitoring/dashboard/v1/scorecard.proto", + "protos/google/monitoring/dashboard/v1/service.proto", + "protos/google/monitoring/dashboard/v1/text.proto", + "protos/google/monitoring/dashboard/v1/widget.proto", + "protos/google/monitoring/dashboard/v1/xychart.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.340936835", + "src/index.ts", + "src/v1/dashboards_service_client.ts", + "src/v1/dashboards_service_client_config.json", + "src/v1/dashboards_service_proto_list.json", + "src/v1/index.ts", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_dashboards_service_v1.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 9dc9f370c4334dde74d0079f2249fb8835d62d3c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 11:12:12 -0700 Subject: [PATCH 082/181] build: move system and samples test from Node 10 to Node 12 (#118) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/05de3e1e14a0b07eab8b474e669164dbd31f81fb --- .../google-monitoring-dashboard/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 6c8069509f1..163610e0526 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "1e010dbd22d50d48f1735aed92f0d0a1ec6ab307" + "sha": "7dd400be175c4c6f0e03ca197f477b143eb5bf0a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" + "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" } } ], @@ -50,19 +50,19 @@ ".kokoro/common.cfg", ".kokoro/continuous/node10/common.cfg", ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", ".kokoro/continuous/node12/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", ".kokoro/presubmit/node12/test.cfg", ".kokoro/publish.sh", ".kokoro/release/docs-devsite.cfg", @@ -85,7 +85,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.3488278276", "protos/google/monitoring/dashboard/v1/common.proto", "protos/google/monitoring/dashboard/v1/dashboard.proto", "protos/google/monitoring/dashboard/v1/dashboards_service.proto", @@ -102,7 +101,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.340936835", "src/index.ts", "src/v1/dashboards_service_client.ts", "src/v1/dashboards_service_client_config.json", From fd8200467466ba1987abdfa4780bb7d6d1882f09 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 21:10:45 -0700 Subject: [PATCH 083/181] build: track flaky tests for "nightly", add new secrets for tagging (#119) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-monitoring-dashboard/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 163610e0526..bb393f5e652 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "7dd400be175c4c6f0e03ca197f477b143eb5bf0a" + "sha": "7f6691f2696fc5c0fcb65cc90046c6591bc96a08" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" + "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" } } ], @@ -42,7 +42,6 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", ".github/workflows/ci.yaml", ".gitignore", ".jsdoc.js", From 5ef6cdca81015d05a2982b8c0a133a9be6fae8d5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 14:06:17 -0700 Subject: [PATCH 084/181] build(test): recursively find test files; fail on unsupported dependency versions (#122) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0832b96d-f20d-428a-9244-9373d24004a9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-monitoring-dashboard/.mocharc.js | 3 ++- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/.mocharc.js b/packages/google-monitoring-dashboard/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/packages/google-monitoring-dashboard/.mocharc.js +++ b/packages/google-monitoring-dashboard/.mocharc.js @@ -14,7 +14,8 @@ const config = { "enable-source-maps": true, "throw-deprecation": true, - "timeout": 10000 + "timeout": 10000, + "recursive": true } if (process.env.MOCHA_THROW_DEPRECATION === 'false') { delete config['throw-deprecation']; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index bb393f5e652..87680839dff 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "7f6691f2696fc5c0fcb65cc90046c6591bc96a08" + "sha": "d29c2e07bbefb59e8aa7acd3a4028831ed2db4f5" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From c2ab4638bf844a525d8a77c752b028881a22fb00 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Oct 2020 08:10:03 -0700 Subject: [PATCH 085/181] chore: update bucket for cloud-rad (#123) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/abddcc47-cb76-4fc4-b8c1-feafeaf13e14/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 87680839dff..3f971cefd5f 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "d29c2e07bbefb59e8aa7acd3a4028831ed2db4f5" + "sha": "294f74d9e222d534f507c0fa6044a78136a54e23" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From 2a50aeb92a36d9953ca9c349701cb52e452f5623 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 7 Oct 2020 18:24:36 -0700 Subject: [PATCH 086/181] build(node_library): migrate to Trampoline V2 (#124) Source-Author: Takashi Matsuo Source-Date: Fri Oct 2 12:13:27 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- packages/google-monitoring-dashboard/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 3f971cefd5f..cb86e813e1a 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "294f74d9e222d534f507c0fa6044a78136a54e23" + "sha": "b4ff035df0ece5631293a438897d79d1176e4483" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" } } ], @@ -74,10 +74,12 @@ ".kokoro/test.bat", ".kokoro/test.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", ".mocharc.js", ".nycrc", ".prettierignore", ".prettierrc.js", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", From 5622bcd0f83585aca645c74524f440693f1f29a3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:54:33 +0200 Subject: [PATCH 087/181] chore(deps): update dependency webpack-cli to v4 (#127) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.3.10` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.0.0) | --- ### Release Notes
webpack/webpack-cli ### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0) ##### Bug Fixes - add compilation lifecycle in watch instance ([#​1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a)) - cleanup `package-utils` package ([#​1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738)) - cli-executer supplies args further up ([#​1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a)) - exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235)) - exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93)) ##### Features - assign config paths in build dependencies in cache config ([#​1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))
--- ### Renovate 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 2a2c9cce1d7..28bc6494264 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -48,7 +48,7 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.2", - "webpack-cli": "^3.3.10", + "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" }, From b76824bb773e707e203c6b36be5d5f62557c9963 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 23:02:38 +0200 Subject: [PATCH 088/181] chore(deps): update dependency webpack to v5 (#126) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | devDependencies | major | [`^4.41.2` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack/4.44.2/5.1.0) | --- ### Release Notes
webpack/webpack ### [`v5.1.0`](https://togithub.com/webpack/webpack/releases/v5.1.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.0.0...v5.1.0) ### Features - expose `webpack` property from `Compiler` - expose `cleverMerge`, `EntryOptionPlugin`, `DynamicEntryPlugin` ### Bugfixes - missing `require("..").xxx` in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free - fix incorrect deprecation message for ModuleTemplate.hooks.hash ### [`v5.0.0`](https://togithub.com/webpack/webpack/releases/v5.0.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v4.44.2...v5.0.0) [Announcement and changelog](https://webpack.js.org/blog/2020-10-10-webpack-5-release/)
--- ### Renovate 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 28bc6494264..f48df4913e5 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -47,7 +47,7 @@ "sinon": "^9.0.1", "ts-loader": "^8.0.0", "typescript": "^3.8.3", - "webpack": "^4.41.2", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From bfe750abd8397350772f9ec200d65e6142f78e10 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Oct 2020 10:21:07 -0700 Subject: [PATCH 089/181] build: only check --engine-strict for production deps (#128) Co-authored-by: Justin Beckwith Source-Author: Benjamin E. Coe Source-Date: Thu Oct 15 17:40:52 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5451633881133e5573cc271a18e73b18caca8b1b Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index cb86e813e1a..320f7500035 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "b4ff035df0ece5631293a438897d79d1176e4483" + "sha": "0548ed8270fec57081104051b6dc4872e3e61350" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From 768531a396cfb121d6cc28b7e2fba1e1ff21ccc0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:14:43 -0700 Subject: [PATCH 090/181] chore: clean up Node.js TOC for cloud-rad (#129) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/53e2a61c-af19-4be7-b9af-c352b89a29fb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 320f7500035..2d3214424ef 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "0548ed8270fec57081104051b6dc4872e3e61350" + "sha": "c0ba1b57397889c439d1a069e18e967ef6a743e0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From 95b3f8fb16bf3f9d310e3aeeadaa2cbab6cef517 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:53 -0700 Subject: [PATCH 091/181] docs: updated code of conduct (includes update to actions) (#132) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8603a334-7a64-49dc-bf6d-29ff55473bfe/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- .../CODE_OF_CONDUCT.md | 123 +++++++++++++----- .../synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md b/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md +++ b/packages/google-monitoring-dashboard/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +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 -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* 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. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +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-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 2d3214424ef..4c7ddff8d0f 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "c0ba1b57397889c439d1a069e18e967ef6a743e0" + "sha": "cf599c3a7e707821cadcd617e032cecea3189a91" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From f431a41c75c2163143638b0be8a72a3e36007823 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:54 -0800 Subject: [PATCH 092/181] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#133) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2b12f6c9-10d8-4a5e-b86e-af5827858559/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 4c7ddff8d0f..adca9b2181a 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "cf599c3a7e707821cadcd617e032cecea3189a91" + "sha": "f0e52f5f94e4db1ccaa4c7d7258358a4362ee11e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From 8b39acb270c475d41f5545e052c3dd7197750d70 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 17:02:15 -0800 Subject: [PATCH 093/181] fix: do not modify options object, use defaultScopes (#134) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- .../google-monitoring-dashboard/package.json | 2 +- .../google-monitoring-dashboard/src/index.ts | 1 + .../src/v1/dashboards_service_client.ts | 151 ++++++++++-------- .../synth.metadata | 16 +- .../system-test/fixtures/sample/src/index.ts | 9 +- .../system-test/install.ts | 18 +-- 6 files changed, 109 insertions(+), 88 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index f48df4913e5..b77ba4e218c 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -29,7 +29,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.1.0" + "google-gax": "^2.9.2" }, "devDependencies": { "@types/mocha": "^8.0.0", diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index 5fc0ce0306e..6a516e14282 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -18,6 +18,7 @@ import * as v1 from './v1'; const DashboardsServiceClient = v1.DashboardsServiceClient; +type DashboardsServiceClient = v1.DashboardsServiceClient; export {v1, DashboardsServiceClient}; export default {v1, DashboardsServiceClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 76b5db78909..c0e8e24b4fc 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -61,8 +61,10 @@ export class DashboardsServiceClient { /** * Construct an instance of DashboardsServiceClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @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] @@ -82,42 +84,33 @@ export class DashboardsServiceClient { * 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. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} 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 the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof DashboardsServiceClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; - - if (!opts) { - opts = {servicePath, port}; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + 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; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the DashboardsServiceClient constructor. + + // 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. - opts.scopes = (this.constructor as typeof DashboardsServiceClient).scopes; + // 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. @@ -126,6 +119,11 @@ export class DashboardsServiceClient { // 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) { @@ -262,6 +260,7 @@ export class DashboardsServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -270,6 +269,7 @@ export class DashboardsServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -277,6 +277,7 @@ export class DashboardsServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -285,6 +286,7 @@ export class DashboardsServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -299,8 +301,7 @@ export class DashboardsServiceClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -367,7 +368,11 @@ export class DashboardsServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.createDashboard(request); */ createDashboard( request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, @@ -463,7 +468,11 @@ export class DashboardsServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.getDashboard(request); */ getDashboard( request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, @@ -557,7 +566,11 @@ export class DashboardsServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.deleteDashboard(request); */ deleteDashboard( request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, @@ -649,7 +662,11 @@ export class DashboardsServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.updateDashboard(request); */ updateDashboard( request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, @@ -751,19 +768,14 @@ export class DashboardsServiceClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * The client library support auto-pagination by default: it will call the API as many + * 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListDashboardsRequest]{@link google.monitoring.dashboard.v1.ListDashboardsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListDashboardsResponse]{@link google.monitoring.dashboard.v1.ListDashboardsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listDashboardsAsync()` + * 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. */ listDashboards( request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, @@ -811,18 +823,7 @@ export class DashboardsServiceClient { } /** - * Equivalent to {@link listDashboards}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listDashboards} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -840,6 +841,13 @@ export class DashboardsServiceClient { * 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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard} 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 `listDashboardsAsync()` + * 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. */ listDashboardsStream( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, @@ -864,10 +872,9 @@ export class DashboardsServiceClient { } /** - * Equivalent to {@link listDashboards}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listDashboards`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -884,7 +891,18 @@ export class DashboardsServiceClient { * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * 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 + * [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. 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.listDashboardsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listDashboardsAsync( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, @@ -974,9 +992,10 @@ export class DashboardsServiceClient { } /** - * Terminate the GRPC channel and close the client. + * 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(); diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index adca9b2181a..0fd7ef6b908 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "f0e52f5f94e4db1ccaa4c7d7258358a4362ee11e" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", + "sha": "e167bd3589436f617422a665496934bd5f89f4cc" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -86,6 +78,7 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.3928346606", "protos/google/monitoring/dashboard/v1/common.proto", "protos/google/monitoring/dashboard/v1/dashboard.proto", "protos/google/monitoring/dashboard/v1/dashboards_service.proto", @@ -102,6 +95,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.3115811802", "src/index.ts", "src/v1/dashboards_service_client.ts", "src/v1/dashboards_service_client_config.json", diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts index 0b1b792a12c..d30b887e112 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {DashboardsServiceClient} from '@google-cloud/monitoring-dashboards'; +// check that the client class type name can be used +function doStuffWithDashboardsServiceClient(client: DashboardsServiceClient) { + client.close(); +} + function main() { - new DashboardsServiceClient(); + // check that the client instance can be created + const dashboardsServiceClient = new DashboardsServiceClient(); + doStuffWithDashboardsServiceClient(dashboardsServiceClient); } main(); diff --git a/packages/google-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-monitoring-dashboard/system-test/install.ts +++ b/packages/google-monitoring-dashboard/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From 2830c867a68e1c891f8eda87083855f1ab28ace4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2020 14:28:18 -0800 Subject: [PATCH 094/181] chore: release 2.1.2 (#135) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index b63eab34f1a..2c7bd46cc87 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.1.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.1...v2.1.2) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#134](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/134)) ([a95ac89](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/a95ac893c9f5d06205244b6b48e5db39a8c4b1e3)) + ### [2.1.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.0...v2.1.1) (2020-07-24) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b77ba4e218c..6d457814c92 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.1.1", + "version": "2.1.2", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index cb2581f8091..a22bf52d1ab 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.1.1" + "@google-cloud/monitoring-dashboards": "^2.1.2" }, "devDependencies": { "c8": "^7.0.0", From a1d0fe59e84ee352aeed1569615815e3a4e98142 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 12:16:09 -0800 Subject: [PATCH 095/181] fix(browser): check for fetch on window --- .../protos/protos.json | 47 +++++++++++-- .../src/v1/dashboards_service_client.ts | 70 +++++++++++-------- .../synth.metadata | 14 ++-- 3 files changed, 91 insertions(+), 40 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 17033db61d2..29383260afa 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -1591,28 +1591,57 @@ "options": { "(google.api.http).post": "/v1/{parent=projects/*}/dashboards", "(google.api.http).body": "dashboard" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/dashboards", + "body": "dashboard" + } + } + ] }, "ListDashboards": { "requestType": "ListDashboardsRequest", "responseType": "ListDashboardsResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*}/dashboards" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/dashboards" + } + } + ] }, "GetDashboard": { "requestType": "GetDashboardRequest", "responseType": "Dashboard", "options": { "(google.api.http).get": "/v1/{name=projects/*/dashboards/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/dashboards/*}" + } + } + ] }, "DeleteDashboard": { "requestType": "DeleteDashboardRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/dashboards/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/dashboards/*}" + } + } + ] }, "UpdateDashboard": { "requestType": "UpdateDashboardRequest", @@ -1620,7 +1649,15 @@ "options": { "(google.api.http).patch": "/v1/{dashboard.name=projects/*/dashboards/*}", "(google.api.http).body": "dashboard" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{dashboard.name=projects/*/dashboards/*}", + "body": "dashboard" + } + } + ] } } }, diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index c0e8e24b4fc..067c8c8ab44 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -16,6 +16,7 @@ // ** 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, @@ -30,6 +31,11 @@ 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/dashboards_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './dashboards_service_client_config.json'; const version = require('../../../package.json').version; @@ -84,9 +90,9 @@ export class DashboardsServiceClient { * 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. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @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` @@ -99,7 +105,9 @@ export class DashboardsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + 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. @@ -318,7 +326,7 @@ export class DashboardsServiceClient { // ------------------- createDashboard( request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.dashboard.v1.IDashboard, @@ -328,7 +336,7 @@ export class DashboardsServiceClient { >; createDashboard( request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest @@ -377,7 +385,7 @@ export class DashboardsServiceClient { createDashboard( request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.ICreateDashboardRequest @@ -400,12 +408,12 @@ export class DashboardsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -420,7 +428,7 @@ export class DashboardsServiceClient { } getDashboard( request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.dashboard.v1.IDashboard, @@ -430,7 +438,7 @@ export class DashboardsServiceClient { >; getDashboard( request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.IGetDashboardRequest @@ -477,7 +485,7 @@ export class DashboardsServiceClient { getDashboard( request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.IGetDashboardRequest @@ -500,12 +508,12 @@ export class DashboardsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -520,7 +528,7 @@ export class DashboardsServiceClient { } deleteDashboard( request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -530,7 +538,7 @@ export class DashboardsServiceClient { >; deleteDashboard( request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest @@ -575,7 +583,7 @@ export class DashboardsServiceClient { deleteDashboard( request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest @@ -598,12 +606,12 @@ export class DashboardsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -618,7 +626,7 @@ export class DashboardsServiceClient { } updateDashboard( request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.dashboard.v1.IDashboard, @@ -628,7 +636,7 @@ export class DashboardsServiceClient { >; updateDashboard( request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest @@ -671,7 +679,7 @@ export class DashboardsServiceClient { updateDashboard( request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.dashboard.v1.IDashboard, | protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest @@ -694,12 +702,12 @@ export class DashboardsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -715,7 +723,7 @@ export class DashboardsServiceClient { listDashboards( request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.dashboard.v1.IDashboard[], @@ -725,7 +733,7 @@ export class DashboardsServiceClient { >; listDashboards( request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.dashboard.v1.IListDashboardsRequest, | protos.google.monitoring.dashboard.v1.IListDashboardsResponse @@ -780,7 +788,7 @@ export class DashboardsServiceClient { listDashboards( request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.dashboard.v1.IListDashboardsRequest, | protos.google.monitoring.dashboard.v1.IListDashboardsResponse @@ -803,12 +811,12 @@ export class DashboardsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -851,7 +859,7 @@ export class DashboardsServiceClient { */ listDashboardsStream( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -906,7 +914,7 @@ export class DashboardsServiceClient { */ listDashboardsAsync( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 0fd7ef6b908..21f67b12a19 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring-dashboards.git", - "sha": "e167bd3589436f617422a665496934bd5f89f4cc" + "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", + "sha": "ba7268317fe29c6055d1504e8a35678bb82eb2db" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", + "internalRef": "343202295" } }, { @@ -78,7 +86,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.3928346606", "protos/google/monitoring/dashboard/v1/common.proto", "protos/google/monitoring/dashboard/v1/dashboard.proto", "protos/google/monitoring/dashboard/v1/dashboards_service.proto", @@ -95,7 +102,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3115811802", "src/index.ts", "src/v1/dashboards_service_client.ts", "src/v1/dashboards_service_client_config.json", From e0d7f8122e872b425aee2e258ca1b0c680d8046a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:53 -0800 Subject: [PATCH 096/181] docs: spelling correction for "targetting" (#139) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0d9476f5-156e-4a9b-9f97-94473eb544b9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- .../google-monitoring-dashboard/README.md | 2 +- .../synth.metadata | 84 +------------------ 2 files changed, 3 insertions(+), 83 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index cf19c6d45a5..293bd437465 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -103,7 +103,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +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)`. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 21f67b12a19..632589a09b5 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "ba7268317fe29c6055d1504e8a35678bb82eb2db" + "sha": "23f9595ba7622f3f6eb4d705506996e1e34fc107" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -33,85 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/monitoring/dashboard/v1/common.proto", - "protos/google/monitoring/dashboard/v1/dashboard.proto", - "protos/google/monitoring/dashboard/v1/dashboards_service.proto", - "protos/google/monitoring/dashboard/v1/drilldowns.proto", - "protos/google/monitoring/dashboard/v1/layouts.proto", - "protos/google/monitoring/dashboard/v1/metrics.proto", - "protos/google/monitoring/dashboard/v1/scorecard.proto", - "protos/google/monitoring/dashboard/v1/service.proto", - "protos/google/monitoring/dashboard/v1/text.proto", - "protos/google/monitoring/dashboard/v1/widget.proto", - "protos/google/monitoring/dashboard/v1/xychart.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1/dashboards_service_client.ts", - "src/v1/dashboards_service_client_config.json", - "src/v1/dashboards_service_proto_list.json", - "src/v1/index.ts", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_dashboards_service_v1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From ad971c58e2d7709df5dacb688fb10fdce00968db Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:42:09 +0000 Subject: [PATCH 097/181] chore: release 2.1.3 (#138) :robot: I have created a release \*beep\* \*boop\* --- ### [2.1.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.2...v2.1.3) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([23f9595](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/23f9595ba7622f3f6eb4d705506996e1e34fc107)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 2c7bd46cc87..a5212483d13 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.1.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.2...v2.1.3) (2020-11-25) + + +### Bug Fixes + +* **browser:** check for fetch on window ([23f9595](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/23f9595ba7622f3f6eb4d705506996e1e34fc107)) + ### [2.1.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.1...v2.1.2) (2020-11-07) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 6d457814c92..248d5efcd58 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.1.2", + "version": "2.1.3", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index a22bf52d1ab..a9543ecbdf7 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.1.2" + "@google-cloud/monitoring-dashboards": "^2.1.3" }, "devDependencies": { "c8": "^7.0.0", From b4e6c033a8a4d3d9e12f6454b68414498e712d20 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:07 -0800 Subject: [PATCH 098/181] chore: generate GAPIC metadata JSON file (#140) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/86075bca-3db9-4047-98b6-39dbe4174275/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v1/gapic_metadata.json | 77 +++++++++++++++++++ .../synth.metadata | 6 +- 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 packages/google-monitoring-dashboard/src/v1/gapic_metadata.json diff --git a/packages/google-monitoring-dashboard/src/v1/gapic_metadata.json b/packages/google-monitoring-dashboard/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..b310e5783de --- /dev/null +++ b/packages/google-monitoring-dashboard/src/v1/gapic_metadata.json @@ -0,0 +1,77 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.monitoring.dashboard.v1", + "libraryPackage": "@google-cloud/monitoring-dashboards", + "services": { + "DashboardsService": { + "clients": { + "grpc": { + "libraryClient": "DashboardsServiceClient", + "rpcs": { + "CreateDashboard": { + "methods": [ + "createDashboard" + ] + }, + "GetDashboard": { + "methods": [ + "getDashboard" + ] + }, + "DeleteDashboard": { + "methods": [ + "deleteDashboard" + ] + }, + "UpdateDashboard": { + "methods": [ + "updateDashboard" + ] + }, + "ListDashboards": { + "methods": [ + "listDashboards", + "listDashboardsStream", + "listDashboardsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DashboardsServiceClient", + "rpcs": { + "CreateDashboard": { + "methods": [ + "createDashboard" + ] + }, + "GetDashboard": { + "methods": [ + "getDashboard" + ] + }, + "DeleteDashboard": { + "methods": [ + "deleteDashboard" + ] + }, + "UpdateDashboard": { + "methods": [ + "updateDashboard" + ] + }, + "ListDashboards": { + "methods": [ + "listDashboards", + "listDashboardsStream", + "listDashboardsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 632589a09b5..9fe8a25a777 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "23f9595ba7622f3f6eb4d705506996e1e34fc107" + "sha": "59f8013b20dc37873eb75462b67abf0d38d95b88" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", - "internalRef": "343202295" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From 9f4eb4eaf62aebb16c59297190d92629a9fc8366 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:44:31 -0800 Subject: [PATCH 099/181] docs: add instructions for authenticating for system tests (#141) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/28ef5920-505e-44eb-bad6-0e53fa99adef/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- .../google-monitoring-dashboard/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-monitoring-dashboard/README.md | 3 +-- .../google-monitoring-dashboard/synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-monitoring-dashboard/CONTRIBUTING.md b/packages/google-monitoring-dashboard/CONTRIBUTING.md index f6c4cf010e3..53bbf08ab2b 100644 --- a/packages/google-monitoring-dashboard/CONTRIBUTING.md +++ b/packages/google-monitoring-dashboard/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Monitoring Dashboards API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=monitoring.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 293bd437465..04b457290db 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -85,8 +85,7 @@ listDashboards(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring-dashboards/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring-dashboards/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 9fe8a25a777..b10107a0ff1 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "59f8013b20dc37873eb75462b67abf0d38d95b88" + "sha": "984fa800a0f2c3f7a44649f9d9493c9be4a5f89e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 6a2b49e9ac9025810e05e026206c264546331bc0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:42:03 -0800 Subject: [PATCH 100/181] docs: update dates (#142) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d365a9d3-f86e-4598-8272-bbf6b821e385/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-monitoring-dashboard/.jsdoc.js | 4 ++-- packages/google-monitoring-dashboard/protos/protos.d.ts | 2 +- packages/google-monitoring-dashboard/protos/protos.js | 2 +- packages/google-monitoring-dashboard/src/index.ts | 2 +- .../src/v1/dashboards_service_client.ts | 2 +- packages/google-monitoring-dashboard/src/v1/index.ts | 2 +- packages/google-monitoring-dashboard/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-monitoring-dashboard/system-test/install.ts | 2 +- .../test/gapic_dashboards_service_v1.ts | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index 21817ea3bec..f2eaa28bbbf 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/monitoring-dashboards', diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 74f82d1c76a..d0592a9ba90 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 976c0261fac..42c6e934f55 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index 6a516e14282..ff2f4b2cc72 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 067c8c8ab44..50428b634b8 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/src/v1/index.ts b/packages/google-monitoring-dashboard/src/v1/index.ts index 5e8b1155e51..73b76335d5f 100644 --- a/packages/google-monitoring-dashboard/src/v1/index.ts +++ b/packages/google-monitoring-dashboard/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index b10107a0ff1..b1c915deb40 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "984fa800a0f2c3f7a44649f9d9493c9be4a5f89e" + "sha": "0cf59f09081edf80c2a7c844a30875e45fa37f9a" } }, { diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js index 1c359c87e21..0279e2f6d0f 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts index d30b887e112..0ffc44c2bd2 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts +++ b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-monitoring-dashboard/system-test/install.ts +++ b/packages/google-monitoring-dashboard/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 816a8534e26..d5be6b05390 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 2b3796fc79972def67762810cd497884453ad261 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:42:17 -0800 Subject: [PATCH 101/181] feat: adds style enumeration (#143) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8b7e3986-c966-4325-9ced-bdd850176095/targets - [ ] To automatically regenerate this PR, check this box. --- .../protos/protos.d.ts | 12 +++ .../protos/protos.js | 78 ++++++++++++++++++- .../protos/protos.json | 13 +++- .../synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index d0592a9ba90..7184e29dc85 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -7607,6 +7607,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -7636,6 +7639,9 @@ export namespace google { /** 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 @@ -7715,6 +7721,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 42c6e934f55..9121945ada7 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -19678,6 +19678,7 @@ * @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 */ /** @@ -19690,6 +19691,7 @@ */ 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) @@ -19744,6 +19746,14 @@ */ 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 @@ -19781,6 +19791,12 @@ 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; }; @@ -19835,6 +19851,16 @@ 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; @@ -19898,6 +19924,18 @@ 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; }; @@ -19942,6 +19980,23 @@ 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; }; @@ -19958,8 +20013,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -19982,6 +20039,11 @@ 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; }; @@ -20012,6 +20074,20 @@ 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; })(); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 29383260afa..2472ee1067b 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -4,7 +4,7 @@ "nested": { "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", @@ -1954,6 +1954,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -1963,6 +1968,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index b1c915deb40..dfee657d69b 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "0cf59f09081edf80c2a7c844a30875e45fa37f9a" + "sha": "c04a677501b1358f1cadb2929d2b3b734e722d36" } }, { From a7f9d71a6b37fbfd5627d82e14c84eaa6dc988e8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:36:39 +0000 Subject: [PATCH 102/181] chore: release 2.2.0 (#144) :robot: I have created a release \*beep\* \*boop\* --- ## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.3...v2.2.0) (2021-01-09) ### Features * adds style enumeration ([#143](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/143)) ([4a90ce9](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/4a90ce9fa7722fde537868ae8aa8f47e45c7789c)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index a5212483d13..69ef3dd1dec 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.3...v2.2.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#143](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/143)) ([4a90ce9](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/4a90ce9fa7722fde537868ae8aa8f47e45c7789c)) + ### [2.1.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.2...v2.1.3) (2020-11-25) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 248d5efcd58..680088c64ca 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.1.3", + "version": "2.2.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index a9543ecbdf7..189b671f38c 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.1.3" + "@google-cloud/monitoring-dashboards": "^2.2.0" }, "devDependencies": { "c8": "^7.0.0", From 7c3463ff7b2fd22f91d3c801c2dd1da6d7f1fede Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:44:07 -0800 Subject: [PATCH 103/181] refactor(nodejs): move build cop to flakybot (#146) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79ba0372-ded2-4df4-829f-0c53e04a7c6d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index dfee657d69b..dd1060a8350 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "c04a677501b1358f1cadb2929d2b3b734e722d36" + "sha": "fddf74df9558d5bc3a8767bfddbfc3dc59906751" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From bb40f3c8b431089e321c88881aa40f6832593839 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 17:56:27 -0800 Subject: [PATCH 104/181] build: adds UNORDERED_LIST enum (#147) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f20ba027-76a5-44ba-baa4-962e18a97819/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-monitoring-dashboard/protos/protos.d.ts | 3 ++- packages/google-monitoring-dashboard/protos/protos.js | 7 +++++++ packages/google-monitoring-dashboard/protos/protos.json | 3 ++- packages/google-monitoring-dashboard/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 7184e29dc85..dfac8960b38 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -7584,7 +7584,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 9121945ada7..d57e71f96bc 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -6232,6 +6232,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -6332,6 +6333,10 @@ 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) { @@ -19654,6 +19659,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -19663,6 +19669,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 2472ee1067b..314784124ab 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -1909,7 +1909,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index dd1060a8350..6051261d9e6 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "fddf74df9558d5bc3a8767bfddbfc3dc59906751" + "sha": "8154bd6b6038791be4aee28637583665c3bd5e0a" } }, { From 56a7baf5394c32bd76ea794ced03a46abdb40c9d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:02:02 -0800 Subject: [PATCH 105/181] build: update gapic-generator-typescript to v1.2.10. (#148) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a27e585a-8362-450e-a458-6225be320237/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-monitoring-dashboard/synth.metadata | 6 +++--- packages/google-monitoring-dashboard/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index 6051261d9e6..cafd55abca1 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "8154bd6b6038791be4aee28637583665c3bd5e0a" + "sha": "090b6614b283dcaae50c4afd4134e3c82b178a7a" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-monitoring-dashboard/webpack.config.js b/packages/google-monitoring-dashboard/webpack.config.js index d5f4b8ce540..86d3aea79a8 100644 --- a/packages/google-monitoring-dashboard/webpack.config.js +++ b/packages/google-monitoring-dashboard/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From b9426fee67a4f25bc8c5a9352c2cba20e50693b8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 19 Mar 2021 11:50:46 -0700 Subject: [PATCH 106/181] feat:added mosaic layout docs:clarified alignment_period max value and updated IAM docs link (#152) * feat:added mosaic layout docs:clarified alignment_period max value and updated IAM docs link PiperOrigin-RevId: 362979558 Source-Author: Google APIs Source-Date: Mon Mar 15 10:55:19 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 0dafa3963ef6fcb8a7f5daaa4bec12adb04de518 Source-Link: https://github.com/googleapis/googleapis/commit/0dafa3963ef6fcb8a7f5daaa4bec12adb04de518 * build: update links from relative to absolute to pass docs tests PiperOrigin-RevId: 363712862 Source-Author: Google APIs Source-Date: Thu Mar 18 12:06:46 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4f5e3aeabb80833f0cfd6dd570a7b18787d3a844 Source-Link: https://github.com/googleapis/googleapis/commit/4f5e3aeabb80833f0cfd6dd570a7b18787d3a844 --- .../monitoring/dashboard/v1/common.proto | 4 +- .../monitoring/dashboard/v1/dashboard.proto | 6 +- .../dashboard/v1/dashboards_service.proto | 17 +- .../monitoring/dashboard/v1/drilldowns.proto | 2 +- .../monitoring/dashboard/v1/layouts.proto | 38 +- .../monitoring/dashboard/v1/metrics.proto | 2 +- .../monitoring/dashboard/v1/scorecard.proto | 3 +- .../monitoring/dashboard/v1/service.proto | 2 +- .../google/monitoring/dashboard/v1/text.proto | 2 +- .../monitoring/dashboard/v1/widget.proto | 2 +- .../monitoring/dashboard/v1/xychart.proto | 2 +- .../protos/protos.d.ts | 221 ++++++- .../protos/protos.js | 550 +++++++++++++++++- .../protos/protos.json | 44 ++ .../src/v1/dashboards_service_client.ts | 15 +- .../synth.metadata | 6 +- 16 files changed, 881 insertions(+), 35 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 6dedcf09eac..ad2225769ee 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -316,6 +316,8 @@ message Aggregation { // `ALIGN_NONE` is specified, this field is required or an error is returned. // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is // specified, then this field is ignored. + // + // The maximum value of the `alignment_period` is 2 years, or 104 weeks. google.protobuf.Duration alignment_period = 1; // An `Aligner` describes how to bring the data points in a single diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index 7a25776ec25..f155e7257d4 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -55,6 +55,10 @@ message Dashboard { // informational elements like widgets or tiles. GridLayout grid_layout = 5; + // The content is arranged as a grid of tiles, with each content widget + // occupying one or more grid blocks. + MosaicLayout mosaic_layout = 6; + // The content is divided into equally spaced rows and the widgets are // arranged horizontally. RowLayout row_layout = 8; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index a7cbef56ee9..2202d603daa 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,11 +40,8 @@ service DashboardsService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Creates a new custom dashboard. - // - // This method requires the `monitoring.dashboards.create` permission - // on the specified project. For more information, see - // [Google Cloud IAM](https://cloud.google.com/iam). + // Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). + // This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { option (google.api.http) = { post: "/v1/{parent=projects/*}/dashboards" @@ -56,7 +53,7 @@ service DashboardsService { // // This method requires the `monitoring.dashboards.list` permission // on the specified project. For more information, see - // [Google Cloud IAM](https://cloud.google.com/iam). + // [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*}/dashboards" @@ -67,7 +64,7 @@ service DashboardsService { // // This method requires the `monitoring.dashboards.get` permission // on the specified dashboard. For more information, see - // [Google Cloud IAM](https://cloud.google.com/iam). + // [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc GetDashboard(GetDashboardRequest) returns (Dashboard) { option (google.api.http) = { get: "/v1/{name=projects/*/dashboards/*}" @@ -78,7 +75,7 @@ service DashboardsService { // // This method requires the `monitoring.dashboards.delete` permission // on the specified dashboard. For more information, see - // [Google Cloud IAM](https://cloud.google.com/iam). + // [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc DeleteDashboard(DeleteDashboardRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/dashboards/*}" @@ -89,7 +86,7 @@ service DashboardsService { // // This method requires the `monitoring.dashboards.update` permission // on the specified dashboard. For more information, see - // [Google Cloud IAM](https://cloud.google.com/iam). + // [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc UpdateDashboard(UpdateDashboardRequest) returns (Dashboard) { option (google.api.http) = { patch: "/v1/{dashboard.name=projects/*/dashboards/*}" diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 0080df5c754..1899e575847 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index acc0517c332..dbc6dc43326 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,6 +35,42 @@ message GridLayout { repeated Widget widgets = 2; } +// A mosaic layout divides the available space into a grid of blocks, and +// overlays the grid with tiles. Unlike `GridLayout`, tiles may span multiple +// grid blocks and can be placed at arbitrary locations in the grid. +message MosaicLayout { + // A single tile in the mosaic. The placement and size of the tile are + // configurable. + message Tile { + // The zero-indexed position of the tile in grid blocks relative to the + // left edge of the grid. Tiles must be contained within the specified + // number of columns. `x_pos` cannot be negative. + int32 x_pos = 1; + + // The zero-indexed position of the tile in grid blocks relative to the + // top edge of the grid. `y_pos` cannot be negative. + int32 y_pos = 2; + + // The width of the tile, measured in grid blocks. Tiles must have a + // minimum width of 1. + int32 width = 3; + + // The height of the tile, measured in grid blocks. Tiles must have a + // minimum height of 1. + int32 height = 4; + + // The informational widget contained in the tile. For example an `XyChart`. + Widget widget = 5; + } + + // The number of columns in the mosaic grid. The number of columns must be + // between 1 and 12, inclusive. + int32 columns = 1; + + // The tiles to display. + repeated Tile tiles = 3; +} + // A simplified layout that divides the available space into rows // and arranges a set of widgets horizontally in each row. message RowLayout { diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index 2fff1d20a22..5807ee17877 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index 1820c031193..7b0ec93fd35 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 5bb41ec598a..a0c6488999f 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index acc1671fcb2..5238a5e1755 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 12b5a698b87..08e70202e4b 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index d241ae783d9..0f7b9ffd5f3 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index dfac8960b38..ca24e42eee8 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -4012,6 +4012,9 @@ export namespace google { /** Dashboard gridLayout */ gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + /** Dashboard mosaicLayout */ + mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); + /** Dashboard rowLayout */ rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); @@ -4040,6 +4043,9 @@ export namespace google { /** Dashboard gridLayout. */ public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + /** Dashboard mosaicLayout. */ + public mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); + /** Dashboard rowLayout. */ public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); @@ -4047,7 +4053,7 @@ export namespace google { public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); /** Dashboard layout. */ - public layout?: ("gridLayout"|"rowLayout"|"columnLayout"); + public layout?: ("gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"); /** * Creates a new Dashboard instance using the specified properties. @@ -4216,6 +4222,219 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a MosaicLayout. */ + interface IMosaicLayout { + + /** MosaicLayout columns */ + columns?: (number|null); + + /** MosaicLayout tiles */ + tiles?: (google.monitoring.dashboard.v1.MosaicLayout.ITile[]|null); + } + + /** Represents a MosaicLayout. */ + class MosaicLayout implements IMosaicLayout { + + /** + * Constructs a new MosaicLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IMosaicLayout); + + /** MosaicLayout columns. */ + public columns: number; + + /** MosaicLayout tiles. */ + public tiles: google.monitoring.dashboard.v1.MosaicLayout.ITile[]; + + /** + * Creates a new MosaicLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns MosaicLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IMosaicLayout): google.monitoring.dashboard.v1.MosaicLayout; + + /** + * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @param message MosaicLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @param message MosaicLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout; + + /** + * Verifies a MosaicLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MosaicLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MosaicLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout; + + /** + * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. + * @param message MosaicLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MosaicLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MosaicLayout { + + /** Properties of a Tile. */ + interface ITile { + + /** Tile xPos */ + xPos?: (number|null); + + /** Tile yPos */ + yPos?: (number|null); + + /** Tile width */ + width?: (number|null); + + /** Tile height */ + height?: (number|null); + + /** Tile widget */ + widget?: (google.monitoring.dashboard.v1.IWidget|null); + } + + /** Represents a Tile. */ + class Tile implements ITile { + + /** + * Constructs a new Tile. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile); + + /** Tile xPos. */ + public xPos: number; + + /** Tile yPos. */ + public yPos: number; + + /** Tile width. */ + public width: number; + + /** Tile height. */ + public height: number; + + /** Tile widget. */ + public widget?: (google.monitoring.dashboard.v1.IWidget|null); + + /** + * Creates a new Tile instance using the specified properties. + * @param [properties] Properties to set + * @returns Tile instance + */ + public static create(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile): google.monitoring.dashboard.v1.MosaicLayout.Tile; + + /** + * Encodes the specified Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @param message Tile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @param message Tile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout.Tile; + + /** + * Decodes a Tile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout.Tile; + + /** + * Verifies a Tile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tile + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout.Tile; + + /** + * Creates a plain object from a Tile message. Also converts values to other types if specified. + * @param message Tile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout.Tile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Properties of a RowLayout. */ interface IRowLayout { diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index d57e71f96bc..b2823187010 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -10889,6 +10889,7 @@ * @property {string|null} [displayName] Dashboard displayName * @property {string|null} [etag] Dashboard etag * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout + * @property {google.monitoring.dashboard.v1.IMosaicLayout|null} [mosaicLayout] Dashboard mosaicLayout * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout */ @@ -10940,6 +10941,14 @@ */ Dashboard.prototype.gridLayout = null; + /** + * Dashboard mosaicLayout. + * @member {google.monitoring.dashboard.v1.IMosaicLayout|null|undefined} mosaicLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.mosaicLayout = null; + /** * Dashboard rowLayout. * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout @@ -10961,12 +10970,12 @@ /** * Dashboard layout. - * @member {"gridLayout"|"rowLayout"|"columnLayout"|undefined} layout + * @member {"gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"|undefined} layout * @memberof google.monitoring.dashboard.v1.Dashboard * @instance */ Object.defineProperty(Dashboard.prototype, "layout", { - get: $util.oneOfGetter($oneOfFields = ["gridLayout", "rowLayout", "columnLayout"]), + get: $util.oneOfGetter($oneOfFields = ["gridLayout", "mosaicLayout", "rowLayout", "columnLayout"]), set: $util.oneOfSetter($oneOfFields) }); @@ -11002,6 +11011,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mosaicLayout != null && Object.hasOwnProperty.call(message, "mosaicLayout")) + $root.google.monitoring.dashboard.v1.MosaicLayout.encode(message.mosaicLayout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) @@ -11052,6 +11063,9 @@ case 5: message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); break; + case 6: + message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.decode(reader, reader.uint32()); + break; case 8: message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); break; @@ -11111,6 +11125,16 @@ return "gridLayout." + error; } } + if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.MosaicLayout.verify(message.mosaicLayout); + if (error) + return "mosaicLayout." + error; + } + } if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { if (properties.layout === 1) return "layout: multiple values"; @@ -11157,6 +11181,11 @@ throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); } + if (object.mosaicLayout != null) { + if (typeof object.mosaicLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.mosaicLayout: object expected"); + message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.fromObject(object.mosaicLayout); + } if (object.rowLayout != null) { if (typeof object.rowLayout !== "object") throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); @@ -11199,6 +11228,11 @@ if (options.oneofs) object.layout = "gridLayout"; } + if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { + object.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.toObject(message.mosaicLayout, options); + if (options.oneofs) + object.layout = "mosaicLayout"; + } if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); if (options.oneofs) @@ -11471,6 +11505,518 @@ return GridLayout; })(); + v1.MosaicLayout = (function() { + + /** + * Properties of a MosaicLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IMosaicLayout + * @property {number|null} [columns] MosaicLayout columns + * @property {Array.|null} [tiles] MosaicLayout tiles + */ + + /** + * Constructs a new MosaicLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a MosaicLayout. + * @implements IMosaicLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set + */ + function MosaicLayout(properties) { + this.tiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MosaicLayout columns. + * @member {number} columns + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + */ + MosaicLayout.prototype.columns = 0; + + /** + * MosaicLayout tiles. + * @member {Array.} tiles + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + */ + MosaicLayout.prototype.tiles = $util.emptyArray; + + /** + * Creates a new MosaicLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout instance + */ + MosaicLayout.create = function create(properties) { + return new MosaicLayout(properties); + }; + + /** + * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MosaicLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.columns); + if (message.tiles != null && message.tiles.length) + for (var i = 0; i < message.tiles.length; ++i) + $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.encode(message.tiles[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MosaicLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MosaicLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int32(); + break; + case 3: + if (!(message.tiles && message.tiles.length)) + message.tiles = []; + message.tiles.push($root.google.monitoring.dashboard.v1.MosaicLayout.Tile.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MosaicLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MosaicLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MosaicLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns)) + return "columns: integer expected"; + if (message.tiles != null && message.hasOwnProperty("tiles")) { + if (!Array.isArray(message.tiles)) + return "tiles: array expected"; + for (var i = 0; i < message.tiles.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.verify(message.tiles[i]); + if (error) + return "tiles." + error; + } + } + return null; + }; + + /** + * Creates a MosaicLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + */ + MosaicLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); + if (object.columns != null) + message.columns = object.columns | 0; + if (object.tiles) { + if (!Array.isArray(object.tiles)) + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: array expected"); + message.tiles = []; + for (var i = 0; i < object.tiles.length; ++i) { + if (typeof object.tiles[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: object expected"); + message.tiles[i] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.fromObject(object.tiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout} message MosaicLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MosaicLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tiles = []; + if (options.defaults) + object.columns = 0; + if (message.columns != null && message.hasOwnProperty("columns")) + object.columns = message.columns; + if (message.tiles && message.tiles.length) { + object.tiles = []; + for (var j = 0; j < message.tiles.length; ++j) + object.tiles[j] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.toObject(message.tiles[j], options); + } + return object; + }; + + /** + * Converts this MosaicLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + * @returns {Object.} JSON object + */ + MosaicLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + MosaicLayout.Tile = (function() { + + /** + * Properties of a Tile. + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @interface ITile + * @property {number|null} [xPos] Tile xPos + * @property {number|null} [yPos] Tile yPos + * @property {number|null} [width] Tile width + * @property {number|null} [height] Tile height + * @property {google.monitoring.dashboard.v1.IWidget|null} [widget] Tile widget + */ + + /** + * Constructs a new Tile. + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @classdesc Represents a Tile. + * @implements ITile + * @constructor + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set + */ + function Tile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tile xPos. + * @member {number} xPos + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.xPos = 0; + + /** + * Tile yPos. + * @member {number} yPos + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.yPos = 0; + + /** + * Tile width. + * @member {number} width + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.width = 0; + + /** + * Tile height. + * @member {number} height + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.height = 0; + + /** + * Tile widget. + * @member {google.monitoring.dashboard.v1.IWidget|null|undefined} widget + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.widget = null; + + /** + * Creates a new Tile instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile instance + */ + Tile.create = function create(properties) { + return new Tile(properties); + }; + + /** + * Encodes the specified Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.xPos != null && Object.hasOwnProperty.call(message, "xPos")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.xPos); + if (message.yPos != null && Object.hasOwnProperty.call(message, "yPos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.yPos); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height); + if (message.widget != null && Object.hasOwnProperty.call(message, "widget")) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widget, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tile message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.xPos = reader.int32(); + break; + case 2: + message.yPos = reader.int32(); + break; + case 3: + message.width = reader.int32(); + break; + case 4: + message.height = reader.int32(); + break; + case 5: + message.widget = $root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tile message. + * @function verify + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.xPos != null && message.hasOwnProperty("xPos")) + if (!$util.isInteger(message.xPos)) + return "xPos: integer expected"; + if (message.yPos != null && message.hasOwnProperty("yPos")) + if (!$util.isInteger(message.yPos)) + return "yPos: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + if (message.widget != null && message.hasOwnProperty("widget")) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widget); + if (error) + return "widget." + error; + } + return null; + }; + + /** + * Creates a Tile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + */ + Tile.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout.Tile) + return object; + var message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); + if (object.xPos != null) + message.xPos = object.xPos | 0; + if (object.yPos != null) + message.yPos = object.yPos | 0; + if (object.width != null) + message.width = object.width | 0; + if (object.height != null) + message.height = object.height | 0; + if (object.widget != null) { + if (typeof object.widget !== "object") + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.Tile.widget: object expected"); + message.widget = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widget); + } + return message; + }; + + /** + * Creates a plain object from a Tile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.Tile} message Tile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.xPos = 0; + object.yPos = 0; + object.width = 0; + object.height = 0; + object.widget = null; + } + if (message.xPos != null && message.hasOwnProperty("xPos")) + object.xPos = message.xPos; + if (message.yPos != null && message.hasOwnProperty("yPos")) + object.yPos = message.yPos; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.widget != null && message.hasOwnProperty("widget")) + object.widget = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widget, options); + return object; + }; + + /** + * Converts this Tile to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + * @returns {Object.} JSON object + */ + Tile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tile; + })(); + + return MosaicLayout; + })(); + v1.RowLayout = (function() { /** diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 314784124ab..fcd472b7b2d 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -1088,6 +1088,7 @@ "layout": { "oneof": [ "gridLayout", + "mosaicLayout", "rowLayout", "columnLayout" ] @@ -1116,6 +1117,10 @@ "type": "GridLayout", "id": 5 }, + "mosaicLayout": { + "type": "MosaicLayout", + "id": 6 + }, "rowLayout": { "type": "RowLayout", "id": 8 @@ -1139,6 +1144,45 @@ } } }, + "MosaicLayout": { + "fields": { + "columns": { + "type": "int32", + "id": 1 + }, + "tiles": { + "rule": "repeated", + "type": "Tile", + "id": 3 + } + }, + "nested": { + "Tile": { + "fields": { + "xPos": { + "type": "int32", + "id": 1 + }, + "yPos": { + "type": "int32", + "id": 2 + }, + "width": { + "type": "int32", + "id": 3 + }, + "height": { + "type": "int32", + "id": 4 + }, + "widget": { + "type": "Widget", + "id": 5 + } + } + } + } + }, "RowLayout": { "fields": { "rows": { diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 50428b634b8..afb44a4354e 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -356,11 +356,8 @@ export class DashboardsServiceClient { > ): void; /** - * Creates a new custom dashboard. - * - * This method requires the `monitoring.dashboards.create` permission - * on the specified project. For more information, see - * [Google Cloud IAM](https://cloud.google.com/iam). + * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). + * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. @@ -462,7 +459,7 @@ export class DashboardsServiceClient { * * This method requires the `monitoring.dashboards.get` permission * on the specified dashboard. For more information, see - * [Google Cloud IAM](https://cloud.google.com/iam). + * [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. @@ -562,7 +559,7 @@ export class DashboardsServiceClient { * * This method requires the `monitoring.dashboards.delete` permission * on the specified dashboard. For more information, see - * [Google Cloud IAM](https://cloud.google.com/iam). + * [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. @@ -660,7 +657,7 @@ export class DashboardsServiceClient { * * This method requires the `monitoring.dashboards.update` permission * on the specified dashboard. For more information, see - * [Google Cloud IAM](https://cloud.google.com/iam). + * [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. @@ -757,7 +754,7 @@ export class DashboardsServiceClient { * * This method requires the `monitoring.dashboards.list` permission * on the specified project. For more information, see - * [Google Cloud IAM](https://cloud.google.com/iam). + * [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index cafd55abca1..a9faddb6d57 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "090b6614b283dcaae50c4afd4134e3c82b178a7a" + "sha": "87b8645d220c9af042ef8022e36c6e3e39ca4444" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" + "sha": "4f5e3aeabb80833f0cfd6dd570a7b18787d3a844", + "internalRef": "363712862" } }, { From 0b38dc63de552333dd9f7819efc343e9ef108c23 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 19 Mar 2021 19:06:02 +0000 Subject: [PATCH 107/181] chore: release 2.3.0 (#153) :robot: I have created a release \*beep\* \*boop\* --- ## [2.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.2.0...v2.3.0) (2021-03-19) ### Features * added mosaic layout docs:clarified alignment_period max value and updated IAM docs link ([#152](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/152)) ([7ccce5a](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/7ccce5a57f0d927fa33a87cad94bf05d6fcb80da)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 69ef3dd1dec..fab821664a1 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.2.0...v2.3.0) (2021-03-19) + + +### Features + +* added mosaic layout docs:clarified alignment_period max value and updated IAM docs link ([#152](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/152)) ([7ccce5a](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/7ccce5a57f0d927fa33a87cad94bf05d6fcb80da)) + ## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.1.3...v2.2.0) (2021-01-09) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 680088c64ca..83076da0050 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.2.0", + "version": "2.3.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 189b671f38c..8623872a11f 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.2.0" + "@google-cloud/monitoring-dashboards": "^2.3.0" }, "devDependencies": { "c8": "^7.0.0", From c5dacd149beea7fdc2a89198b6b828617ec00385 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:52:17 +0100 Subject: [PATCH 108/181] chore(deps): update dependency sinon to v10 (#154) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.0.1` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Renovate 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 83076da0050..e6927885462 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -44,7 +44,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.1", + "sinon": "^10.0.0", "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 9a1397805c7cd14f4f0e1304ff453741a23915c6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:10:28 +0200 Subject: [PATCH 109/181] chore(deps): update dependency @types/sinon to v10 (#156) [![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.0` -> `^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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index e6927885462..b90f8c09e97 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@types/mocha": "^8.0.0", "@types/node": "^12.0.0", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.0.0", "gts": "^2.0.0", "jsdoc": "^3.5.5", From 0fd7a7874ac3c179f8f7078e88aa59bf383ebf2a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:58 +0200 Subject: [PATCH 110/181] chore(deps): update dependency ts-loader to v9 (#159) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b90f8c09e97..f4bfdf03fa5 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -45,7 +45,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.0", + "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", "webpack-cli": "^4.0.0", From e269a3a72ac60e5382e9ce0fc5e37d3aa73af889 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Apr 2021 11:02:15 -0700 Subject: [PATCH 111/181] chore: regenerate common templates (#158) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a2b9b6b0-6911-4d73-92bd-3c9c35909e3f/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/c6706ee5d693e9ae5967614170732646590d8374 Source-Link: https://github.com/googleapis/synthtool/commit/b33b0e2056a85fc2264b294f2cf47dcd45e95186 Source-Link: https://github.com/googleapis/synthtool/commit/898b38a6f4fab89a76dfb152480bb034a781331b --- packages/google-monitoring-dashboard/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata index a9faddb6d57..55486f7a964 100644 --- a/packages/google-monitoring-dashboard/synth.metadata +++ b/packages/google-monitoring-dashboard/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "87b8645d220c9af042ef8022e36c6e3e39ca4444" + "sha": "fbaf19a23d6fdf9e26389bf11e6ef6b754b29673" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "c6706ee5d693e9ae5967614170732646590d8374" } } ], From d7815cd846f420da6c0341d37fe37f4793063721 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 20 Apr 2021 16:34:08 -0700 Subject: [PATCH 112/181] chore: migrate to owl bot (#160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-monitoring-dashboards/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # 🦕 --- .../.github/.OwlBot.yaml | 26 +++++++++++++ .../.repo-metadata.json | 11 +++--- .../{synth.py => owlbot.py} | 25 ++----------- .../google-monitoring-dashboard/src/index.ts | 8 ++-- .../synth.metadata | 37 ------------------- 5 files changed, 41 insertions(+), 66 deletions(-) create mode 100644 packages/google-monitoring-dashboard/.github/.OwlBot.yaml rename packages/google-monitoring-dashboard/{synth.py => owlbot.py} (52%) delete mode 100644 packages/google-monitoring-dashboard/synth.metadata diff --git a/packages/google-monitoring-dashboard/.github/.OwlBot.yaml b/packages/google-monitoring-dashboard/.github/.OwlBot.yaml new file mode 100644 index 00000000000..c6700136f3c --- /dev/null +++ b/packages/google-monitoring-dashboard/.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/monitoring/dashboard/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: dea0fe87a4015bc79a036811aafe13c8f9aa8528 + diff --git a/packages/google-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json index e25b7e83623..2652bd5029a 100644 --- a/packages/google-monitoring-dashboard/.repo-metadata.json +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -1,13 +1,14 @@ { + "api_id": "monitoring.googleapis.com", "name": "monitoring-dashboards", - "name_pretty": "Monitoring Dashboards", + "language": "nodejs", "product_documentation": "https://cloud.google.com/monitoring/docs", - "client_documentation": "https://googleapis.dev/nodejs/monitoring-dashboards/latest", + "distribution_name": "@google-cloud/monitoring-dashboards", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", + "name_pretty": "Monitoring Dashboards", + "default_version": "v1", "release_level": "ga", - "language": "nodejs", "repo": "googleapis/nodejs-monitoring-dashboards", - "distribution_name": "@google-cloud/monitoring-dashboards", - "api_id": "monitoring.googleapis.com", + "client_documentation": "https://googleapis.dev/nodejs/monitoring-dashboards/latest", "requires_billing": true } diff --git a/packages/google-monitoring-dashboard/synth.py b/packages/google-monitoring-dashboard/owlbot.py similarity index 52% rename from packages/google-monitoring-dashboard/synth.py rename to packages/google-monitoring-dashboard/owlbot.py index d5973bd8826..2246ed0501f 100644 --- a/packages/google-monitoring-dashboard/synth.py +++ b/packages/google-monitoring-dashboard/owlbot.py @@ -13,26 +13,9 @@ # 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 logging -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ['v1'] -for version in versions: - library = gapic.node_library('monitoring-dashboard', version, proto_path='google/monitoring/dashboard/v1') -s.copy(library, excludes=['README.md', 'package.json']) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') -s.copy(templates, excludes=['.github/release-please.yml']) - -node.postprocess_gapic_library() +node.owlbot_main( + staging_excludes=['README.md', 'package.json'], + templates_excludes=['.github/release-please.yml'] +) diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index ff2f4b2cc72..f224f8e57a2 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. @@ -12,13 +12,15 @@ // 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 ** +// ** 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 DashboardsServiceClient = v1.DashboardsServiceClient; type DashboardsServiceClient = v1.DashboardsServiceClient; + export {v1, DashboardsServiceClient}; export default {v1, DashboardsServiceClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-monitoring-dashboard/synth.metadata b/packages/google-monitoring-dashboard/synth.metadata deleted file mode 100644 index 55486f7a964..00000000000 --- a/packages/google-monitoring-dashboard/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring-dashboards.git", - "sha": "fbaf19a23d6fdf9e26389bf11e6ef6b754b29673" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f5e3aeabb80833f0cfd6dd570a7b18787d3a844", - "internalRef": "363712862" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c6706ee5d693e9ae5967614170732646590d8374" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "monitoring-dashboard", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file From 0e6228230449a9960cf6bb9be0c283964c1a0c4b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 23 Apr 2021 12:24:21 -0700 Subject: [PATCH 113/181] docs: update links to absolute path (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: update links to absolute path PiperOrigin-RevId: 369540262 Source-Link: https://github.com/googleapis/googleapis/commit/3ac97c83a5e31abd8352c04eb5cb69d8e0028745 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc7b443347197a9b127d4cb1681c0b62b84a9cbf * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- .../google/monitoring/dashboard/v1/common.proto | 1 + .../monitoring/dashboard/v1/dashboard.proto | 1 + .../dashboard/v1/dashboards_service.proto | 9 +++++++-- .../monitoring/dashboard/v1/drilldowns.proto | 1 + .../google/monitoring/dashboard/v1/layouts.proto | 1 + .../google/monitoring/dashboard/v1/metrics.proto | 12 ++++++++---- .../monitoring/dashboard/v1/scorecard.proto | 7 +++++-- .../google/monitoring/dashboard/v1/service.proto | 1 + .../google/monitoring/dashboard/v1/text.proto | 1 + .../google/monitoring/dashboard/v1/widget.proto | 1 + .../google/monitoring/dashboard/v1/xychart.proto | 15 +++++++++------ .../protos/protos.json | 1 + .../src/v1/dashboards_service_client.ts | 8 ++++++-- 13 files changed, 43 insertions(+), 16 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index ad2225769ee..9695d0344aa 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // Describes how to combine multiple time series to provide a different view of diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index f155e7257d4..d315e3dc633 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -24,6 +24,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "DashboardsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A Google Stackdriver dashboard. Dashboards define the content and layout diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index 2202d603daa..a29d7fed01f 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -28,6 +28,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "DashboardsServiceProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // Manages Stackdriver dashboards. A dashboard is an arrangement of data display @@ -40,8 +41,12 @@ service DashboardsService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). - // This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). + // Creates a new custom dashboard. For examples on how you can use this API to + // create dashboards, see [Managing dashboards by + // API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the + // `monitoring.dashboards.create` permission on the specified project. For + // more information about permissions, see [Cloud Identity and Access + // Management](https://cloud.google.com/iam). rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { option (google.api.http) = { post: "/v1/{parent=projects/*}/dashboards" diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 1899e575847..3b859e41a45 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -22,4 +22,5 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "DrilldownsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index dbc6dc43326..ab5743af5f7 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -22,6 +22,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "LayoutsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A basic layout divides the available space into vertical columns of equal diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index 5807ee17877..dc87641c2e9 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "MetricsProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // TimeSeriesQuery collects the set of supported methods for querying time @@ -53,8 +54,9 @@ message TimeSeriesQuery { // [`ListTimeSeries`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) // method. message TimeSeriesFilter { - // Required. The [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - // that identifies the metric types, resources, and projects to query. + // Required. The [monitoring + // filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies + // the metric types, resources, and projects to query. string filter = 1 [(google.api.field_behavior) = REQUIRED]; // By default, the raw time series data is returned. @@ -72,7 +74,8 @@ message TimeSeriesFilter { // Statistics based time series filter. // Note: This field is deprecated and completely ignored by the API. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 + [deprecated = true]; } } @@ -111,7 +114,8 @@ message TimeSeriesFilterRatio { // Statistics based time series filter. // Note: This field is deprecated and completely ignored by the API. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 + [deprecated = true]; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index 7b0ec93fd35..41af7aa555c 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -25,6 +25,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "ScorecardProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A widget showing the latest value of a metric, and how this value relates to @@ -49,7 +50,8 @@ message Scorecard { // timeseries. message SparkChartView { // Required. The type of sparkchart to show in this chartView. - SparkChartType spark_chart_type = 1 [(google.api.field_behavior) = REQUIRED]; + SparkChartType spark_chart_type = 1 + [(google.api.field_behavior) = REQUIRED]; // The lower bound on data point frequency in the chart implemented by // specifying the minimum alignment period to use in a time series query. @@ -61,7 +63,8 @@ message Scorecard { // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; + TimeSeriesQuery time_series_query = 1 + [(google.api.field_behavior) = REQUIRED]; // Defines the optional additional chart shown on the scorecard. If // neither is included - then a default scorecard is shown. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index a0c6488999f..8fc0fafc2b9 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -20,4 +20,5 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 5238a5e1755..92969c2a86c 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -20,6 +20,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "TextProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A widget that displays textual content. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 08e70202e4b..525eef6a441 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -26,6 +26,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "WidgetProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // Widget contains a single dashboard component and configuration of how to diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index 0f7b9ffd5f3..4581596842b 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -24,6 +24,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/ option java_multiple_files = true; option java_outer_classname = "XyChartProto"; option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; // A chart that displays data on a 2D (X and Y axes) plane. @@ -59,7 +60,8 @@ message XyChart { // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; + TimeSeriesQuery time_series_query = 1 + [(google.api.field_behavior) = REQUIRED]; // How this data should be plotted on the chart. PlotType plot_type = 2; @@ -69,12 +71,13 @@ message XyChart { // which will resolve to the label's value. string legend_template = 3; - // Optional. The lower bound on data point frequency for this data set, implemented by - // specifying the minimum alignment period to use in a time series query - // For example, if the data is published once every 10 minutes, the - // `min_alignment_period` should be at least 10 minutes. It would not + // Optional. The lower bound on data point frequency for this data set, + // implemented by specifying the minimum alignment period to use in a time + // series query. For example, if the data is published once every 10 minutes, + // the `min_alignment_period` should be at least 10 minutes. It would not // make sense to fetch and align data at one minute intervals. - google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration min_alignment_period = 4 + [(google.api.field_behavior) = OPTIONAL]; } // A chart axis. diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index fcd472b7b2d..2b225e5d04e 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -957,6 +957,7 @@ "java_multiple_files": true, "java_outer_classname": "ServiceMonitoringProto", "java_package": "com.google.monitoring.dashboard.v1", + "php_namespace": "Google\\Cloud\\Monitoring\\Dashboard\\V1", "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1" }, "nested": { diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index afb44a4354e..95c6c2f9eeb 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -356,8 +356,12 @@ export class DashboardsServiceClient { > ): void; /** - * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). - * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). + * Creates a new custom dashboard. For examples on how you can use this API to + * create dashboards, see [Managing dashboards by + * API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the + * `monitoring.dashboards.create` permission on the specified project. For + * more information about permissions, see [Cloud Identity and Access + * Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. From 05129bc9c67a4f74d42cdcab8bea5ce2b3e97ff4 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:50:31 -0700 Subject: [PATCH 114/181] fix(deps): require google-gax v2.12.0 (#167) --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index f4bfdf03fa5..ff4e9074e28 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -29,7 +29,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 18b84f7d532c8d47fe506684a183d2dcbe73d7b4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:00:42 +0000 Subject: [PATCH 115/181] chore: new owl bot post processor docker image (#169) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 12 +-- .../protos/protos.js | 24 ++--- .../src/v1/dashboards_service_client.ts | 80 ++++++++-------- .../test/gapic_dashboards_service_v1.ts | 95 ++++++++----------- 4 files changed, 96 insertions(+), 115 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index ca24e42eee8..d82480fb2d6 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -5268,7 +5268,7 @@ export namespace google { public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); /** TimeSeriesQuery timeSeriesQueryLanguage. */ - public timeSeriesQueryLanguage: string; + public timeSeriesQueryLanguage?: (string|null); /** TimeSeriesQuery unitOverride. */ public unitOverride: string; @@ -8188,19 +8188,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index b2823187010..86b5e9d1aaf 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -14064,11 +14064,11 @@ /** * TimeSeriesQuery timeSeriesQueryLanguage. - * @member {string} timeSeriesQueryLanguage + * @member {string|null|undefined} timeSeriesQueryLanguage * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery * @instance */ - TimeSeriesQuery.prototype.timeSeriesQueryLanguage = ""; + TimeSeriesQuery.prototype.timeSeriesQueryLanguage = null; /** * TimeSeriesQuery unitOverride. @@ -21129,43 +21129,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 95c6c2f9eeb..97cb7a27573 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -241,13 +241,14 @@ export class DashboardsServiceClient { ]; for (const methodName of dashboardsServiceStubMethods) { const callPromise = this.dashboardsServiceStub.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; } @@ -419,11 +420,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createDashboard(request, options, callback); } @@ -519,11 +519,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getDashboard(request, options, callback); } @@ -617,11 +616,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteDashboard(request, options, callback); } @@ -713,11 +711,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'dashboard.name': request.dashboard!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'dashboard.name': request.dashboard!.name || '', + }); this.initialize(); return this.innerApiCalls.updateDashboard(request, options, callback); } @@ -822,11 +819,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listDashboards(request, options, callback); } @@ -866,11 +862,10 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDashboards.createStream( @@ -921,17 +916,16 @@ export class DashboardsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listDashboards.asyncIterate( this.innerApiCalls['listDashboards'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index d5be6b05390..8d203989e4e 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + 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; @@ -249,9 +248,8 @@ describe('v1.DashboardsServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); - client.innerApiCalls.createDashboard = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createDashboard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createDashboard( request, @@ -361,9 +359,8 @@ describe('v1.DashboardsServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); - client.innerApiCalls.getDashboard = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getDashboard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getDashboard( request, @@ -473,9 +470,8 @@ describe('v1.DashboardsServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteDashboard = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteDashboard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteDashboard( request, @@ -587,9 +583,8 @@ describe('v1.DashboardsServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); - client.innerApiCalls.updateDashboard = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateDashboard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateDashboard( request, @@ -716,9 +711,8 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.Dashboard() ), ]; - client.innerApiCalls.listDashboards = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listDashboards = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listDashboards( request, @@ -796,9 +790,8 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.Dashboard() ), ]; - client.descriptors.page.listDashboards.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listDashboards.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listDashboardsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.dashboard.v1.Dashboard[] = []; @@ -823,10 +816,9 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(client.innerApiCalls.listDashboards, request) ); assert.strictEqual( - (client.descriptors.page.listDashboards - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDashboards.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -843,10 +835,8 @@ describe('v1.DashboardsServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listDashboards.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listDashboards.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listDashboardsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.dashboard.v1.Dashboard[] = []; @@ -870,10 +860,9 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(client.innerApiCalls.listDashboards, request) ); assert.strictEqual( - (client.descriptors.page.listDashboards - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDashboards.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -900,9 +889,8 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.Dashboard() ), ]; - client.descriptors.page.listDashboards.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listDashboards.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = []; const iterable = client.listDashboardsAsync(request); for await (const resource of iterable) { @@ -910,15 +898,15 @@ describe('v1.DashboardsServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listDashboards - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listDashboards.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listDashboards - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDashboards.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -935,27 +923,26 @@ describe('v1.DashboardsServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listDashboards.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listDashboards.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listDashboardsAsync(request); await assert.rejects(async () => { - const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = []; + const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listDashboards - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listDashboards.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listDashboards - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listDashboards.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); From 7c460a6c9220523fe2466a9b9d8b8fbd877872a8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:06 +0000 Subject: [PATCH 116/181] fix: use require() to load JSON protos (#170) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1/dashboards_service_client.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 97cb7a27573..9ff46a2edbd 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -31,6 +31,7 @@ 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/dashboards_service_client_config.json`. @@ -146,22 +147,7 @@ export class DashboardsServiceClient { 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); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. From e73a49eca703fcedc30ec3d2e2920649c09e3c86 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:52 +0000 Subject: [PATCH 117/181] chore: update gapic-generator-typescript to v1.3.2 (#171) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- .../src/v1/dashboards_service_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 9ff46a2edbd..aa3e1ac885d 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From 7e23268662870470719e19be2a8cf69c439baa43 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:33:22 -0700 Subject: [PATCH 118/181] chore: release 2.3.1 (#168) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 8 ++++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index fab821664a1..9b69551fa0e 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.3.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.0...v2.3.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#167](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/167)) ([3316b86](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/3316b8619dafe3dde4dbba355907cdf804974ef8)) +* use require() to load JSON protos ([#170](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/170)) ([af92ed3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/af92ed3942a3889a3567514b3614e04a2955dc17)) + ## [2.3.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.2.0...v2.3.0) (2021-03-19) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index ff4e9074e28..31c0a0112fc 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.3.0", + "version": "2.3.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 8623872a11f..df3e845e891 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.3.0" + "@google-cloud/monitoring-dashboards": "^2.3.1" }, "devDependencies": { "c8": "^7.0.0", From 6ff402c19ffb3af82ba4fc4c0ed85f0962c7068f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 May 2021 19:06:13 +0200 Subject: [PATCH 119/181] chore(deps): update dependency @types/node to v14 (#175) 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) | [`^12.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/12.20.13/14.17.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/compatibility-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/confidence-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 31c0a0112fc..b926ddc7108 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^12.0.0", + "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", "gts": "^2.0.0", From 3fd4f83afaae581f5dd6ead19cf99dde1d069a0a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 18:00:15 +0200 Subject: [PATCH 120/181] chore(deps): update dependency sinon to v11 (#176) 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b926ddc7108..d1a8b204937 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -44,7 +44,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From dd1861acab2ff715a2386dc2c9510800f455ef2c 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:41 +0000 Subject: [PATCH 121/181] fix: GoogleAdsError missing using generator version after 1.3.0 (#177) [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/dashboards_service_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index aa3e1ac885d..d199a5bd488 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -141,6 +141,8 @@ export class DashboardsServiceClient { } 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 b862c20d33efda875f36803a9be64db666207408 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:27:20 -0400 Subject: [PATCH 122/181] chore: release 2.3.2 (#178) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 9b69551fa0e..5ab5c3c5251 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.1...v2.3.2) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#177](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/177)) ([5e89c98](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/5e89c9890ce5f2762398f46105be44301d4d6aa2)) + ### [2.3.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.0...v2.3.1) (2021-05-12) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index d1a8b204937..b3ea842048f 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.3.1", + "version": "2.3.2", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index df3e845e891..b6f5805cdb5 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.3.1" + "@google-cloud/monitoring-dashboards": "^2.3.2" }, "devDependencies": { "c8": "^7.0.0", From 16aa00ef6ddb8c84f5fd9b27bd2a9218472a3488 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Fri, 11 Jun 2021 01:00:03 +0200 Subject: [PATCH 123/181] chore(nodejs): remove api-extractor dependencies (#183) --- packages/google-monitoring-dashboard/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b3ea842048f..9a6c20b65c2 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -24,9 +24,7 @@ "test": "c8 mocha build/test", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.12.0" @@ -48,9 +46,7 @@ "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", - "webpack-cli": "^4.0.0", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "webpack-cli": "^4.0.0" }, "engines": { "node": ">=10" From 9c9c42cef44bb90fc16f58b2a3cf83b4fce9a30d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:22:36 +0000 Subject: [PATCH 124/181] fix: make request optional in all cases (#185) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1/dashboards_service_client.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index d199a5bd488..a4ce0db6056 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -313,7 +313,7 @@ export class DashboardsServiceClient { // -- Service calls -- // ------------------- createDashboard( - request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options?: CallOptions ): Promise< [ @@ -372,7 +372,7 @@ export class DashboardsServiceClient { * const [response] = await client.createDashboard(request); */ createDashboard( - request: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, optionsOrCallback?: | CallOptions | Callback< @@ -415,7 +415,7 @@ export class DashboardsServiceClient { return this.innerApiCalls.createDashboard(request, options, callback); } getDashboard( - request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options?: CallOptions ): Promise< [ @@ -471,7 +471,7 @@ export class DashboardsServiceClient { * const [response] = await client.getDashboard(request); */ getDashboard( - request: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, optionsOrCallback?: | CallOptions | Callback< @@ -514,7 +514,7 @@ export class DashboardsServiceClient { return this.innerApiCalls.getDashboard(request, options, callback); } deleteDashboard( - request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options?: CallOptions ): Promise< [ @@ -568,7 +568,7 @@ export class DashboardsServiceClient { * const [response] = await client.deleteDashboard(request); */ deleteDashboard( - request: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, optionsOrCallback?: | CallOptions | Callback< @@ -611,7 +611,7 @@ export class DashboardsServiceClient { return this.innerApiCalls.deleteDashboard(request, options, callback); } updateDashboard( - request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options?: CallOptions ): Promise< [ @@ -663,7 +663,7 @@ export class DashboardsServiceClient { * const [response] = await client.updateDashboard(request); */ updateDashboard( - request: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, + request?: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, optionsOrCallback?: | CallOptions | Callback< @@ -707,7 +707,7 @@ export class DashboardsServiceClient { } listDashboards( - request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, options?: CallOptions ): Promise< [ @@ -771,7 +771,7 @@ export class DashboardsServiceClient { * for more details and examples. */ listDashboards( - request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 714f858c579b2a06d8f752e56d23022d45f250f0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:48:25 +0000 Subject: [PATCH 125/181] chore: release 2.3.3 (#186) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.2...v2.3.3) (2021-06-22) ### Bug Fixes * make request optional in all cases ([#185](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/185)) ([898bf5c](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/898bf5c5259cab24d64326d7b0ddf37d6a7e7571)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 5ab5c3c5251..52c4999d67c 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.2...v2.3.3) (2021-06-22) + + +### Bug Fixes + +* make request optional in all cases ([#185](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/185)) ([898bf5c](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/898bf5c5259cab24d64326d7b0ddf37d6a7e7571)) + ### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.1...v2.3.2) (2021-05-25) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 9a6c20b65c2..d3f26b6fc2c 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.3.2", + "version": "2.3.3", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index b6f5805cdb5..4eff4613646 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.3.2" + "@google-cloud/monitoring-dashboards": "^2.3.3" }, "devDependencies": { "c8": "^7.0.0", From 6e5776b03cfdc9c6508676b13c31401ddad08caf Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:24:57 -0400 Subject: [PATCH 126/181] fix(deps): google-gax v2.17.0 with mTLS (#191) --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index d3f26b6fc2c..1e74939ffa9 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -27,7 +27,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From be120c89f25b05b7cd22d52b247a92e7241882c5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 15:48:36 +0000 Subject: [PATCH 127/181] chore: release 2.3.4 (#192) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.3...v2.3.4) (2021-06-29) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#191](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/191)) ([88b6413](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/88b6413a83bb2594f1f7371073940e37118fdcbb)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 52c4999d67c..ac867a97dd3 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.3...v2.3.4) (2021-06-29) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#191](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/191)) ([88b6413](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/88b6413a83bb2594f1f7371073940e37118fdcbb)) + ### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.2...v2.3.3) (2021-06-22) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 1e74939ffa9..32d30822de3 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.3.3", + "version": "2.3.4", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 4eff4613646..8b84992a5b3 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.3.3" + "@google-cloud/monitoring-dashboards": "^2.3.4" }, "devDependencies": { "c8": "^7.0.0", From 9637ca3c11f402aecbc8cb42843184a20d0508e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 13:35:27 -0700 Subject: [PATCH 128/181] feat: added validation only mode when writing dashboards feat: added alert chart widget (#194) PiperOrigin-RevId: 383440655 Source-Link: https://github.com/googleapis/googleapis/commit/b5532bb5023faa22f8b44f6e14608646178a2ee7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f3018d0bb9f0b59dfcc1c03fbd555a5eee364d00 --- .../monitoring/dashboard/v1/alertchart.proto | 40 + .../dashboard/v1/dashboards_service.proto | 16 +- .../monitoring/dashboard/v1/metrics.proto | 11 +- .../monitoring/dashboard/v1/scorecard.proto | 6 +- .../monitoring/dashboard/v1/widget.proto | 4 + .../monitoring/dashboard/v1/xychart.proto | 14 +- .../protos/protos.d.ts | 12694 ++--- .../protos/protos.js | 38842 ++++++++-------- .../protos/protos.json | 2712 +- .../src/v1/dashboards_service_client.ts | 55 +- .../src/v1/dashboards_service_proto_list.json | 1 + .../test/gapic_dashboards_service_v1.ts | 52 + 12 files changed, 27493 insertions(+), 26954 deletions(-) create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto new file mode 100644 index 00000000000..459e1e639e6 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto @@ -0,0 +1,40 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "AlertChartProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A chart that displays alert policy data. +message AlertChart { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicy" + pattern: "projects/{project}/alertPolicies/{alert_policy}" + }; + + // Required. The resource name of the alert policy. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index a29d7fed01f..f9746c1b9d3 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -41,12 +41,8 @@ service DashboardsService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Creates a new custom dashboard. For examples on how you can use this API to - // create dashboards, see [Managing dashboards by - // API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the - // `monitoring.dashboards.create` permission on the specified project. For - // more information about permissions, see [Cloud Identity and Access - // Management](https://cloud.google.com/iam). + // Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](/monitoring/dashboards/api-dashboard). + // This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](/iam). rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { option (google.api.http) = { post: "/v1/{parent=projects/*}/dashboards" @@ -111,6 +107,10 @@ message CreateDashboardRequest { // Required. The initial dashboard specification. Dashboard dashboard = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set, validate the request and preview the review, but do not actually + // save it. + bool validate_only = 3; } // The `ListDashboards` request. @@ -178,4 +178,8 @@ message DeleteDashboardRequest { message UpdateDashboardRequest { // Required. The dashboard that will replace the existing dashboard. Dashboard dashboard = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, validate the request and preview the review, but do not actually + // save it. + bool validate_only = 3; } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index dc87641c2e9..fc2b8069162 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -54,9 +54,8 @@ message TimeSeriesQuery { // [`ListTimeSeries`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) // method. message TimeSeriesFilter { - // Required. The [monitoring - // filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies - // the metric types, resources, and projects to query. + // Required. The [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // that identifies the metric types, resources, and projects to query. string filter = 1 [(google.api.field_behavior) = REQUIRED]; // By default, the raw time series data is returned. @@ -74,8 +73,7 @@ message TimeSeriesFilter { // Statistics based time series filter. // Note: This field is deprecated and completely ignored by the API. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5 - [deprecated = true]; + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; } } @@ -114,8 +112,7 @@ message TimeSeriesFilterRatio { // Statistics based time series filter. // Note: This field is deprecated and completely ignored by the API. - StatisticalTimeSeriesFilter statistical_time_series_filter = 5 - [deprecated = true]; + StatisticalTimeSeriesFilter statistical_time_series_filter = 5 [deprecated = true]; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index 41af7aa555c..bb18639032f 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -50,8 +50,7 @@ message Scorecard { // timeseries. message SparkChartView { // Required. The type of sparkchart to show in this chartView. - SparkChartType spark_chart_type = 1 - [(google.api.field_behavior) = REQUIRED]; + SparkChartType spark_chart_type = 1 [(google.api.field_behavior) = REQUIRED]; // The lower bound on data point frequency in the chart implemented by // specifying the minimum alignment period to use in a time series query. @@ -63,8 +62,7 @@ message Scorecard { // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1 - [(google.api.field_behavior) = REQUIRED]; + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; // Defines the optional additional chart shown on the scorecard. If // neither is included - then a default scorecard is shown. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 525eef6a441..795eac8d925 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/alertchart.proto"; import "google/monitoring/dashboard/v1/scorecard.proto"; import "google/monitoring/dashboard/v1/text.proto"; import "google/monitoring/dashboard/v1/xychart.proto"; @@ -48,5 +49,8 @@ message Widget { // A blank space. google.protobuf.Empty blank = 5; + + // A chart of alert policy data. + AlertChart alert_chart = 7; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index 4581596842b..b820efb348a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -60,8 +60,7 @@ message XyChart { // Required. Fields for querying time series data from the // Stackdriver metrics API. - TimeSeriesQuery time_series_query = 1 - [(google.api.field_behavior) = REQUIRED]; + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; // How this data should be plotted on the chart. PlotType plot_type = 2; @@ -71,13 +70,12 @@ message XyChart { // which will resolve to the label's value. string legend_template = 3; - // Optional. The lower bound on data point frequency for this data set, - // implemented by specifying the minimum alignment period to use in a time - // series query. For example, if the data is published once every 10 minutes, - // the `min_alignment_period` should be at least 10 minutes. It would not + // Optional. The lower bound on data point frequency for this data set, implemented by + // specifying the minimum alignment period to use in a time series query + // For example, if the data is published once every 10 minutes, the + // `min_alignment_period` should be at least 10 minutes. It would not // make sense to fetch and align data at one minute intervals. - google.protobuf.Duration min_alignment_period = 4 - [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; } // A chart axis. diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index d82480fb2d6..c46617baec8 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -17,8368 +17,8476 @@ import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of an Any. */ - interface IAny { + /** Namespace monitoring. */ + namespace monitoring { - /** Any type_url */ - type_url?: (string|null); + /** Namespace dashboard. */ + namespace dashboard { - /** Any value */ - value?: (Uint8Array|string|null); - } + /** Namespace v1. */ + namespace v1 { - /** Represents an Any. */ - class Any implements IAny { + /** Properties of an AlertChart. */ + interface IAlertChart { - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** AlertChart name */ + name?: (string|null); + } - /** Any type_url. */ - public type_url: string; + /** Represents an AlertChart. */ + class AlertChart implements IAlertChart { - /** Any value. */ - public value: (Uint8Array|string); + /** + * Constructs a new AlertChart. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IAlertChart); - /** - * 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; + /** AlertChart name. */ + public name: string; - /** - * 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; + /** + * Creates a new AlertChart instance using the specified properties. + * @param [properties] Properties to set + * @returns AlertChart instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IAlertChart): google.monitoring.dashboard.v1.AlertChart; - /** - * 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; + /** + * Encodes the specified AlertChart message. Does not implicitly {@link google.monitoring.dashboard.v1.AlertChart.verify|verify} messages. + * @param message AlertChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IAlertChart, 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; + /** + * Encodes the specified AlertChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.AlertChart.verify|verify} messages. + * @param message AlertChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IAlertChart, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes an AlertChart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlertChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.AlertChart; - /** - * 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); + /** + * Decodes an AlertChart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlertChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.AlertChart; - /** - * 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; + /** + * Verifies an AlertChart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an 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 }; + /** + * Creates an AlertChart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlertChart + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.AlertChart; - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an AlertChart message. Also converts values to other types if specified. + * @param message AlertChart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.AlertChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Timestamp. */ - interface ITimestamp { + /** + * Converts this AlertChart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Properties of an Aggregation. */ + interface IAggregation { - /** Timestamp nanos */ - nanos?: (number|null); - } + /** Aggregation alignmentPeriod */ + alignmentPeriod?: (google.protobuf.IDuration|null); - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Aggregation perSeriesAligner */ + perSeriesAligner?: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner|null); - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** Aggregation crossSeriesReducer */ + crossSeriesReducer?: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer|null); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** Aggregation groupByFields */ + groupByFields?: (string[]|null); + } - /** Timestamp nanos. */ - public nanos: number; + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { - /** - * 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; + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IAggregation); - /** - * 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; + /** Aggregation alignmentPeriod. */ + public alignmentPeriod?: (google.protobuf.IDuration|null); - /** - * 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; + /** Aggregation perSeriesAligner. */ + public perSeriesAligner: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner); - /** - * 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; + /** Aggregation crossSeriesReducer. */ + public crossSeriesReducer: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer); - /** - * 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; + /** Aggregation groupByFields. */ + public groupByFields: string[]; - /** - * 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 new Aggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregation instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IAggregation): google.monitoring.dashboard.v1.Aggregation; - /** - * 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; + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Aggregation; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Aggregation; + + /** + * Verifies an Aggregation message. + * @param message Plain 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 Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Aggregation; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Aggregation { + + /** Aligner enum. */ + enum Aligner { + ALIGN_NONE = 0, + ALIGN_DELTA = 1, + ALIGN_RATE = 2, + ALIGN_INTERPOLATE = 3, + ALIGN_NEXT_OLDER = 4, + ALIGN_MIN = 10, + ALIGN_MAX = 11, + ALIGN_MEAN = 12, + ALIGN_COUNT = 13, + ALIGN_SUM = 14, + ALIGN_STDDEV = 15, + ALIGN_COUNT_TRUE = 16, + ALIGN_COUNT_FALSE = 24, + ALIGN_FRACTION_TRUE = 17, + ALIGN_PERCENTILE_99 = 18, + ALIGN_PERCENTILE_95 = 19, + ALIGN_PERCENTILE_50 = 20, + ALIGN_PERCENTILE_05 = 21, + ALIGN_PERCENT_CHANGE = 23 + } + + /** Reducer enum. */ + enum Reducer { + REDUCE_NONE = 0, + REDUCE_MEAN = 1, + REDUCE_MIN = 2, + REDUCE_MAX = 3, + REDUCE_SUM = 4, + REDUCE_STDDEV = 5, + REDUCE_COUNT = 6, + REDUCE_COUNT_TRUE = 7, + REDUCE_COUNT_FALSE = 15, + REDUCE_FRACTION_TRUE = 8, + REDUCE_PERCENTILE_99 = 9, + REDUCE_PERCENTILE_95 = 10, + REDUCE_PERCENTILE_50 = 11, + REDUCE_PERCENTILE_05 = 12 + } + } + + /** Properties of a PickTimeSeriesFilter. */ + interface IPickTimeSeriesFilter { + + /** PickTimeSeriesFilter rankingMethod */ + rankingMethod?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null); + + /** PickTimeSeriesFilter numTimeSeries */ + numTimeSeries?: (number|null); + + /** PickTimeSeriesFilter direction */ + direction?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null); + } + + /** Represents a PickTimeSeriesFilter. */ + class PickTimeSeriesFilter implements IPickTimeSeriesFilter { + + /** + * Constructs a new PickTimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter); + + /** PickTimeSeriesFilter rankingMethod. */ + public rankingMethod: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method); + + /** PickTimeSeriesFilter numTimeSeries. */ + public numTimeSeries: number; + + /** PickTimeSeriesFilter direction. */ + public direction: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction); + + /** + * Creates a new PickTimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PickTimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @param message PickTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @param message PickTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Verifies a PickTimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PickTimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + + /** + * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. + * @param message PickTimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.PickTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PickTimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PickTimeSeriesFilter { + + /** Method enum. */ + enum Method { + METHOD_UNSPECIFIED = 0, + METHOD_MEAN = 1, + METHOD_MAX = 2, + METHOD_MIN = 3, + METHOD_SUM = 4, + METHOD_LATEST = 5 + } + + /** Direction enum. */ + enum Direction { + DIRECTION_UNSPECIFIED = 0, + TOP = 1, + BOTTOM = 2 + } + } + + /** Properties of a StatisticalTimeSeriesFilter. */ + interface IStatisticalTimeSeriesFilter { + + /** StatisticalTimeSeriesFilter rankingMethod */ + rankingMethod?: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null); + + /** StatisticalTimeSeriesFilter numTimeSeries */ + numTimeSeries?: (number|null); + } + + /** Represents a StatisticalTimeSeriesFilter. */ + class StatisticalTimeSeriesFilter implements IStatisticalTimeSeriesFilter { + + /** + * Constructs a new StatisticalTimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter); + + /** StatisticalTimeSeriesFilter rankingMethod. */ + public rankingMethod: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method); + + /** StatisticalTimeSeriesFilter numTimeSeries. */ + public numTimeSeries: number; + + /** + * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StatisticalTimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @param message StatisticalTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @param message StatisticalTimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Verifies a StatisticalTimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatisticalTimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + + /** + * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. + * @param message StatisticalTimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatisticalTimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace StatisticalTimeSeriesFilter { + + /** Method enum. */ + enum Method { + METHOD_UNSPECIFIED = 0, + METHOD_CLUSTER_OUTLIER = 1 + } + } + + /** Properties of a Dashboard. */ + interface IDashboard { + + /** Dashboard name */ + name?: (string|null); + + /** Dashboard displayName */ + displayName?: (string|null); + + /** Dashboard etag */ + etag?: (string|null); + + /** Dashboard gridLayout */ + gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + + /** Dashboard mosaicLayout */ + mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); + + /** Dashboard rowLayout */ + rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + + /** Dashboard columnLayout */ + columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + } + + /** Represents a Dashboard. */ + class Dashboard implements IDashboard { + + /** + * Constructs a new Dashboard. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDashboard); + + /** Dashboard name. */ + public name: string; + + /** Dashboard displayName. */ + public displayName: string; - /** Properties of a Duration. */ - interface IDuration { + /** Dashboard etag. */ + public etag: string; - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** Dashboard gridLayout. */ + public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); - /** Duration nanos */ - nanos?: (number|null); - } + /** Dashboard mosaicLayout. */ + public mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); - /** Represents a Duration. */ - class Duration implements IDuration { + /** Dashboard rowLayout. */ + public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** Dashboard columnLayout. */ + public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); - /** Duration seconds. */ - public seconds: (number|Long|string); + /** Dashboard layout. */ + public layout?: ("gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"); - /** Duration nanos. */ - public nanos: number; + /** + * Creates a new Dashboard instance using the specified properties. + * @param [properties] Properties to set + * @returns Dashboard instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDashboard): google.monitoring.dashboard.v1.Dashboard; - /** - * 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 Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @param message Dashboard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboard, 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 Dashboard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Dashboard; - /** - * 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 Dashboard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Dashboard; - /** - * 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 Dashboard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dashboard + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Dashboard; + + /** + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @param message Dashboard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Dashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dashboard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GridLayout. */ + interface IGridLayout { + + /** GridLayout columns */ + columns?: (number|Long|string|null); + + /** GridLayout widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } + + /** Represents a GridLayout. */ + class GridLayout implements IGridLayout { + + /** + * Constructs a new GridLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); + + /** GridLayout columns. */ + public columns: (number|Long|string); + + /** GridLayout widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; + + /** + * Creates a new GridLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns GridLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IGridLayout): google.monitoring.dashboard.v1.GridLayout; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @param message GridLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GridLayout; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GridLayout; + + /** + * Verifies a GridLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GridLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GridLayout; + + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @param message GridLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.GridLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GridLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MosaicLayout. */ + interface IMosaicLayout { + + /** MosaicLayout columns */ + columns?: (number|null); + + /** MosaicLayout tiles */ + tiles?: (google.monitoring.dashboard.v1.MosaicLayout.ITile[]|null); + } + + /** Represents a MosaicLayout. */ + class MosaicLayout implements IMosaicLayout { + + /** + * Constructs a new MosaicLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IMosaicLayout); + + /** MosaicLayout columns. */ + public columns: number; + + /** MosaicLayout tiles. */ + public tiles: google.monitoring.dashboard.v1.MosaicLayout.ITile[]; + + /** + * Creates a new MosaicLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns MosaicLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IMosaicLayout): google.monitoring.dashboard.v1.MosaicLayout; - /** - * 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); + /** + * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @param message MosaicLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @param message MosaicLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a MosaicLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout; - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** + * Verifies a MosaicLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** + * Creates a MosaicLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MosaicLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout; - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** + * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. + * @param message MosaicLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** + * Converts this MosaicLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + namespace MosaicLayout { - /** - * 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; + /** Properties of a Tile. */ + interface ITile { - /** - * 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; + /** Tile xPos */ + xPos?: (number|null); - /** - * 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; + /** Tile yPos */ + yPos?: (number|null); - /** - * 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; + /** Tile width */ + width?: (number|null); - /** - * 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; + /** Tile height */ + height?: (number|null); - /** - * 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); + /** Tile widget */ + widget?: (google.monitoring.dashboard.v1.IWidget|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; + /** Represents a Tile. */ + class Tile implements ITile { - /** - * 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 }; + /** + * Constructs a new Tile. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile); - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Tile xPos. */ + public xPos: number; - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** Tile yPos. */ + public yPos: number; - /** FileDescriptorProto name */ - name?: (string|null); + /** Tile width. */ + public width: number; - /** FileDescriptorProto package */ - "package"?: (string|null); + /** Tile height. */ + public height: number; - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); + /** Tile widget. */ + public widget?: (google.monitoring.dashboard.v1.IWidget|null); - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** + * Creates a new Tile instance using the specified properties. + * @param [properties] Properties to set + * @returns Tile instance + */ + public static create(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile): google.monitoring.dashboard.v1.MosaicLayout.Tile; - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** + * Encodes the specified Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @param message Tile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @param message Tile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Decodes a Tile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout.Tile; - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** + * Decodes a Tile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout.Tile; - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Verifies a Tile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** + * Creates a Tile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tile + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout.Tile; - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** + * Creates a plain object from a Tile message. Also converts values to other types if specified. + * @param message Tile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout.Tile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } + /** + * Converts this Tile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Properties of a RowLayout. */ + interface IRowLayout { - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + /** RowLayout rows */ + rows?: (google.monitoring.dashboard.v1.RowLayout.IRow[]|null); + } - /** FileDescriptorProto name. */ - public name: string; + /** Represents a RowLayout. */ + class RowLayout implements IRowLayout { - /** FileDescriptorProto package. */ - public package: string; + /** + * Constructs a new RowLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IRowLayout); - /** FileDescriptorProto dependency. */ - public dependency: string[]; + /** RowLayout rows. */ + public rows: google.monitoring.dashboard.v1.RowLayout.IRow[]; - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; + /** + * Creates a new RowLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns RowLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IRowLayout): google.monitoring.dashboard.v1.RowLayout; - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + /** + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @param message RowLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Decodes a RowLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout; - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** + * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout; - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Verifies a RowLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout; - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @param message RowLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.RowLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileDescriptorProto syntax. */ - public syntax: string; + /** + * Converts this RowLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace RowLayout { - /** - * 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; + /** Properties of a Row. */ + interface IRow { - /** - * 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; + /** Row weight */ + weight?: (number|Long|string|null); - /** - * 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; + /** Row widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } - /** - * 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; + /** Represents a Row. */ + class Row implements IRow { - /** - * 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); + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); - /** - * 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; + /** Row weight. */ + public weight: (number|Long|string); - /** - * 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 }; + /** Row widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.monitoring.dashboard.v1.RowLayout.IRow): google.monitoring.dashboard.v1.RowLayout.Row; - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto name */ - name?: (string|null); + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout.Row; - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout.Row; - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.RowLayout.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** Properties of a ColumnLayout. */ + interface IColumnLayout { - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** ColumnLayout columns */ + columns?: (google.monitoring.dashboard.v1.ColumnLayout.IColumn[]|null); + } - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** Represents a ColumnLayout. */ + class ColumnLayout implements IColumnLayout { - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** + * Constructs a new ColumnLayout. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IColumnLayout); - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** ColumnLayout columns. */ + public columns: google.monitoring.dashboard.v1.ColumnLayout.IColumn[]; - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); + /** + * Creates a new ColumnLayout instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnLayout instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IColumnLayout): google.monitoring.dashboard.v1.ColumnLayout; - /** DescriptorProto name. */ - public name: string; + /** + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @param message ColumnLayout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Decodes a ColumnLayout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout; - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout; - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Verifies a ColumnLayout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnLayout + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout; - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @param message ColumnLayout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** + * Converts this ColumnLayout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + namespace ColumnLayout { - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** Properties of a Column. */ + interface IColumn { - /** - * 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; + /** Column weight */ + weight?: (number|Long|string|null); - /** - * 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; + /** Column widgets */ + widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); + } - /** - * 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; + /** Represents a Column. */ + class Column implements IColumn { - /** - * 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; + /** + * Constructs a new Column. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); - /** - * 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; + /** Column weight. */ + public weight: (number|Long|string); - /** - * 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); + /** Column widgets. */ + public widgets: google.monitoring.dashboard.v1.IWidget[]; - /** - * 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 new Column instance using the specified properties. + * @param [properties] Properties to set + * @returns Column instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn): google.monitoring.dashboard.v1.ColumnLayout.Column; - /** - * 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 }; + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @param message Column message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; - namespace DescriptorProto { + /** + * Decodes a Column message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout.Column; - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout.Column; - /** ExtensionRange start */ - start?: (number|null); + /** + * Verifies a Column message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ExtensionRange end */ - end?: (number|null); + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Column + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout.Column; - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @param message Column + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** + * Converts this Column to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** Properties of a Widget. */ + interface IWidget { - /** ExtensionRange start. */ - public start: number; + /** Widget title */ + title?: (string|null); - /** ExtensionRange end. */ - public end: number; + /** Widget xyChart */ + xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** Widget scorecard */ + scorecard?: (google.monitoring.dashboard.v1.IScorecard|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; + /** Widget text */ + text?: (google.monitoring.dashboard.v1.IText|null); - /** - * 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; + /** Widget blank */ + blank?: (google.protobuf.IEmpty|null); - /** - * 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; + /** Widget alertChart */ + alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); + } - /** - * 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; + /** Represents a Widget. */ + class Widget implements IWidget { - /** - * 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; + /** + * Constructs a new Widget. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IWidget); - /** - * 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); + /** Widget title. */ + public title: string; - /** - * 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; + /** Widget xyChart. */ + public xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); - /** - * 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 }; + /** Widget scorecard. */ + public scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Widget text. */ + public text?: (google.monitoring.dashboard.v1.IText|null); - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** Widget blank. */ + public blank?: (google.protobuf.IEmpty|null); - /** ReservedRange start */ - start?: (number|null); + /** Widget alertChart. */ + public alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); - /** ReservedRange end */ - end?: (number|null); - } + /** Widget content. */ + public content?: ("xyChart"|"scorecard"|"text"|"blank"|"alertChart"); - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** + * Creates a new Widget instance using the specified properties. + * @param [properties] Properties to set + * @returns Widget instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IWidget): google.monitoring.dashboard.v1.Widget; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReservedRange start. */ - public start: number; + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @param message Widget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; - /** ReservedRange end. */ - public end: number; + /** + * Decodes a Widget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Widget; - /** - * 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; + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Widget; - /** - * 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; + /** + * Verifies a Widget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Widget + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Widget; - /** - * 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; + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @param message Widget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Widget, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this Widget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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); + /** Properties of a Scorecard. */ + interface IScorecard { - /** - * 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; + /** Scorecard timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** - * 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 }; + /** Scorecard gaugeView */ + gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Scorecard sparkChartView */ + sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Scorecard thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + } - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** Represents a Scorecard. */ + class Scorecard implements IScorecard { - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** + * Constructs a new Scorecard. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IScorecard); - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + /** Scorecard timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Scorecard gaugeView. */ + public gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); - /** - * 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; + /** Scorecard sparkChartView. */ + public sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); - /** - * 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; + /** Scorecard thresholds. */ + public thresholds: google.monitoring.dashboard.v1.IThreshold[]; - /** - * 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; + /** Scorecard dataView. */ + public dataView?: ("gaugeView"|"sparkChartView"); - /** - * 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; + /** + * Creates a new Scorecard instance using the specified properties. + * @param [properties] Properties to set + * @returns Scorecard instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IScorecard): google.monitoring.dashboard.v1.Scorecard; - /** - * 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; + /** + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @param message Scorecard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @param message Scorecard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a Scorecard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard; - /** - * 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 }; + /** + * Decodes a Scorecard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard; - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a Scorecard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scorecard + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard; - /** FieldDescriptorProto name */ - name?: (string|null); + /** + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. + * @param message Scorecard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto number */ - number?: (number|null); + /** + * Converts this Scorecard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + namespace Scorecard { - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** Properties of a GaugeView. */ + interface IGaugeView { - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** GaugeView lowerBound */ + lowerBound?: (number|null); - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** GaugeView upperBound */ + upperBound?: (number|null); + } - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** Represents a GaugeView. */ + class GaugeView implements IGaugeView { - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * Constructs a new GaugeView. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView); - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** GaugeView lowerBound. */ + public lowerBound: number; - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** GaugeView upperBound. */ + public upperBound: number; + + /** + * Creates a new GaugeView instance using the specified properties. + * @param [properties] Properties to set + * @returns GaugeView instance + */ + public static create(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView): google.monitoring.dashboard.v1.Scorecard.GaugeView; + + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @param message GaugeView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @param message GaugeView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.GaugeView; - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.GaugeView; - /** FieldDescriptorProto name. */ - public name: string; + /** + * Verifies a GaugeView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto number. */ - public number: number; + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GaugeView + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.GaugeView; - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @param message GaugeView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard.GaugeView, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** + * Converts this GaugeView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** Properties of a SparkChartView. */ + interface ISparkChartView { - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** SparkChartView sparkChartType */ + sparkChartType?: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType|null); - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** SparkChartView minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + } - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** Represents a SparkChartView. */ + class SparkChartView implements ISparkChartView { - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Constructs a new SparkChartView. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** SparkChartView sparkChartType. */ + public sparkChartType: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType); - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** SparkChartView minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); - /** - * 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; + /** + * Creates a new SparkChartView instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkChartView instance + */ + public static create(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView): google.monitoring.dashboard.v1.Scorecard.SparkChartView; - /** - * 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 SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @param message SparkChartView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, 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; + /** + * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @param message SparkChartView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, 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 SparkChartView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.SparkChartView; - /** - * 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; + /** + * Decodes a SparkChartView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.SparkChartView; - /** - * 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); + /** + * Verifies a SparkChartView message. + * @param message Plain object 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 SparkChartView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkChartView + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.SparkChartView; - /** - * 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 }; + /** + * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. + * @param message SparkChartView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Scorecard.SparkChartView, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this SparkChartView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - namespace FieldDescriptorProto { + /** Properties of a TimeSeriesQuery. */ + interface ITimeSeriesQuery { - /** 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 - } + /** TimeSeriesQuery timeSeriesFilter */ + timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } + /** TimeSeriesQuery timeSeriesFilterRatio */ + timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** TimeSeriesQuery timeSeriesQueryLanguage */ + timeSeriesQueryLanguage?: (string|null); - /** OneofDescriptorProto name */ - name?: (string|null); + /** TimeSeriesQuery unitOverride */ + unitOverride?: (string|null); + } - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + /** Represents a TimeSeriesQuery. */ + class TimeSeriesQuery implements ITimeSeriesQuery { - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** + * Constructs a new TimeSeriesQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery); - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** TimeSeriesQuery timeSeriesFilter. */ + public timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); - /** OneofDescriptorProto name. */ - public name: string; + /** TimeSeriesQuery timeSeriesFilterRatio. */ + public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** TimeSeriesQuery timeSeriesQueryLanguage. */ + public timeSeriesQueryLanguage?: (string|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; + /** TimeSeriesQuery unitOverride. */ + public unitOverride: string; - /** - * 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; + /** TimeSeriesQuery source. */ + public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"); - /** - * 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; + /** + * Creates a new TimeSeriesQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesQuery instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery): google.monitoring.dashboard.v1.TimeSeriesQuery; - /** - * 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; + /** + * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @param message TimeSeriesQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesQuery; - /** - * 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; + /** + * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesQuery; - /** - * 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 }; + /** + * Verifies a TimeSeriesQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesQuery + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesQuery; - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + /** + * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @param message TimeSeriesQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Converts this TimeSeriesQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of a TimeSeriesFilter. */ + interface ITimeSeriesFilter { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** TimeSeriesFilter filter */ + filter?: (string|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** TimeSeriesFilter aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** TimeSeriesFilter secondaryAggregation */ + secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** TimeSeriesFilter pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + /** TimeSeriesFilter statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + } - /** EnumDescriptorProto name. */ - public name: string; + /** Represents a TimeSeriesFilter. */ + class TimeSeriesFilter implements ITimeSeriesFilter { - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** + * Constructs a new TimeSeriesFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** TimeSeriesFilter filter. */ + public filter: string; - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** TimeSeriesFilter aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** TimeSeriesFilter secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** - * 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; + /** TimeSeriesFilter pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + + /** TimeSeriesFilter statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + + /** TimeSeriesFilter outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + + /** + * Creates a new TimeSeriesFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter): google.monitoring.dashboard.v1.TimeSeriesFilter; + + /** + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @param message TimeSeriesFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, 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 a TimeSeriesFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilter; - /** - * 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 a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilter; - /** - * 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 a TimeSeriesFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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 a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilter; - /** - * 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 a TimeSeriesFilter message. Also converts values to other types if specified. + * @param message TimeSeriesFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 TimeSeriesFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a TimeSeriesFilterRatio. */ + interface ITimeSeriesFilterRatio { - namespace EnumDescriptorProto { + /** TimeSeriesFilterRatio numerator */ + numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** TimeSeriesFilterRatio denominator */ + denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** EnumReservedRange start */ - start?: (number|null); + /** TimeSeriesFilterRatio secondaryAggregation */ + secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** EnumReservedRange end */ - end?: (number|null); - } + /** TimeSeriesFilterRatio pickTimeSeriesFilter */ + pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter */ + statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + } - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + /** Represents a TimeSeriesFilterRatio. */ + class TimeSeriesFilterRatio implements ITimeSeriesFilterRatio { - /** EnumReservedRange start. */ - public start: number; + /** + * Constructs a new TimeSeriesFilterRatio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio); - /** EnumReservedRange end. */ - public end: number; + /** TimeSeriesFilterRatio numerator. */ + public numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** - * 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; + /** TimeSeriesFilterRatio denominator. */ + public denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); - /** - * 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; + /** TimeSeriesFilterRatio secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** - * 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; + /** TimeSeriesFilterRatio pickTimeSeriesFilter. */ + public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); - /** - * 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; + /** TimeSeriesFilterRatio statisticalTimeSeriesFilter. */ + public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); - /** - * 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; + /** TimeSeriesFilterRatio outputFilter. */ + public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); - /** - * 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 a new TimeSeriesFilterRatio instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesFilterRatio instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** - * 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; + /** + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @param message TimeSeriesFilterRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** + * Verifies a TimeSeriesFilterRatio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesFilterRatio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * @param message TimeSeriesFilterRatio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** + * Converts this TimeSeriesFilterRatio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + namespace TimeSeriesFilterRatio { - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** Properties of a RatioPart. */ + interface IRatioPart { - /** EnumValueDescriptorProto name. */ - public name: string; + /** RatioPart filter */ + filter?: (string|null); - /** EnumValueDescriptorProto number. */ - public number: number; + /** RatioPart aggregation */ + aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + } - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** Represents a RatioPart. */ + class RatioPart implements IRatioPart { - /** - * 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; + /** + * Constructs a new RatioPart. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart); - /** - * 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; + /** RatioPart filter. */ + public filter: string; - /** - * 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; + /** RatioPart aggregation. */ + public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - /** - * 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; + /** + * Creates a new RatioPart instance using the specified properties. + * @param [properties] Properties to set + * @returns RatioPart instance + */ + public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; - /** - * 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; + /** + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @param message RatioPart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a RatioPart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; - /** - * 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 }; + /** + * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a RatioPart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RatioPart + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; - /** ServiceDescriptorProto name */ - name?: (string|null); + /** + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @param message RatioPart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** + * Converts this RatioPart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** Properties of a Threshold. */ + interface IThreshold { - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Threshold label */ + label?: (string|null); - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** Threshold value */ + value?: (number|null); - /** ServiceDescriptorProto name. */ - public name: string; + /** Threshold color */ + color?: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color|null); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** Threshold direction */ + direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); + } - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** Represents a Threshold. */ + class Threshold implements IThreshold { - /** - * 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; + /** + * Constructs a new Threshold. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IThreshold); - /** - * 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; + /** Threshold label. */ + public label: string; - /** - * 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; + /** Threshold value. */ + public value: number; - /** - * 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; + /** Threshold color. */ + public color: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color); - /** - * 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; + /** Threshold direction. */ + public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); - /** - * 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 new Threshold instance using the specified properties. + * @param [properties] Properties to set + * @returns Threshold instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IThreshold): google.monitoring.dashboard.v1.Threshold; - /** - * 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; + /** + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @param message Threshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a Threshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Threshold; - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** + * Decodes a Threshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Threshold; - /** MethodDescriptorProto name */ - name?: (string|null); + /** + * Verifies a Threshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Threshold + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Threshold; - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @param message Threshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Threshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** + * Converts this Threshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + namespace Threshold { - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** Color enum. */ + enum Color { + COLOR_UNSPECIFIED = 0, + YELLOW = 4, + RED = 6 + } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Direction enum. */ + enum Direction { + DIRECTION_UNSPECIFIED = 0, + ABOVE = 1, + BELOW = 2 + } + } - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** SparkChartType enum. */ + enum SparkChartType { + SPARK_CHART_TYPE_UNSPECIFIED = 0, + SPARK_LINE = 1, + SPARK_BAR = 2 + } - /** MethodDescriptorProto name. */ - public name: string; + /** Properties of a Text. */ + interface IText { - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** Text content */ + content?: (string|null); - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** Text format */ + format?: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format|null); + } - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** Represents a Text. */ + class Text implements IText { - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IText); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** Text content. */ + public content: string; - /** - * 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; + /** Text format. */ + public format: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format); - /** - * 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; + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; - /** - * 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; + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IText, 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; + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @param message Text message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a Text message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; + + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; - /** - * 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); + /** + * Verifies a Text message. + * @param message Plain object 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 Text message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Text + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; - /** - * 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 }; + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a FileOptions. */ - interface IFileOptions { + namespace Text { - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + MARKDOWN = 1, + RAW = 2 + } + } - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** Properties of a XyChart. */ + interface IXyChart { - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** XyChart dataSets */ + dataSets?: (google.monitoring.dashboard.v1.XyChart.IDataSet[]|null); - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** XyChart timeshiftDuration */ + timeshiftDuration?: (google.protobuf.IDuration|null); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** XyChart thresholds */ + thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** XyChart xAxis */ + xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** FileOptions goPackage */ - goPackage?: (string|null); + /** XyChart yAxis */ + yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** XyChart chartOptions */ + chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + } - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** Represents a XyChart. */ + class XyChart implements IXyChart { - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** + * Constructs a new XyChart. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IXyChart); - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); + /** XyChart dataSets. */ + public dataSets: google.monitoring.dashboard.v1.XyChart.IDataSet[]; - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** XyChart timeshiftDuration. */ + public timeshiftDuration?: (google.protobuf.IDuration|null); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** XyChart thresholds. */ + public thresholds: google.monitoring.dashboard.v1.IThreshold[]; - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** XyChart xAxis. */ + public xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** XyChart yAxis. */ + public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** XyChart chartOptions. */ + public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** + * Creates a new XyChart instance using the specified properties. + * @param [properties] Properties to set + * @returns XyChart instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IXyChart): google.monitoring.dashboard.v1.XyChart; - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @param message XyChart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** + * Decodes a XyChart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart; - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Decodes a XyChart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart; - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + /** + * Verifies a XyChart message. + * @param message 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 FileOptions. */ - class FileOptions implements IFileOptions { + /** + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns XyChart + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart; - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @param message XyChart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions javaPackage. */ - public javaPackage: string; + /** + * Converts this XyChart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + namespace XyChart { - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** Properties of a DataSet. */ + interface IDataSet { - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** DataSet timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** DataSet plotType */ + plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** DataSet legendTemplate */ + legendTemplate?: (string|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** DataSet minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + } - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** Represents a DataSet. */ + class DataSet implements IDataSet { - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Constructs a new DataSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet); - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** DataSet timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** DataSet plotType. */ + public plotType: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType); - /** FileOptions deprecated. */ - public deprecated: boolean; + /** DataSet legendTemplate. */ + public legendTemplate: string; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** DataSet minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Creates a new DataSet instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSet instance + */ + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet): google.monitoring.dashboard.v1.XyChart.DataSet; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @param message DataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * Decodes a DataSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.DataSet; - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** + * Decodes a DataSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.DataSet; - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** + * Verifies a DataSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSet + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.DataSet; - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates a plain object from a DataSet message. Also converts values to other types if specified. + * @param message DataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart.DataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this DataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace DataSet { - /** - * 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; + /** PlotType enum. */ + enum PlotType { + PLOT_TYPE_UNSPECIFIED = 0, + LINE = 1, + STACKED_AREA = 2, + STACKED_BAR = 3, + HEATMAP = 4 + } + } - /** - * 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; + /** Properties of an Axis. */ + interface IAxis { - /** - * 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; + /** Axis label */ + label?: (string|null); - /** - * 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); + /** Axis scale */ + scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale|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; + /** Represents an Axis. */ + class Axis implements IAxis { - /** - * 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 }; + /** + * Constructs a new Axis. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.XyChart.IAxis); - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Axis label. */ + public label: string; - namespace FileOptions { + /** Axis scale. */ + public scale: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale); - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } + /** + * Creates a new Axis instance using the specified properties. + * @param [properties] Properties to set + * @returns Axis instance + */ + public static create(properties?: google.monitoring.dashboard.v1.XyChart.IAxis): google.monitoring.dashboard.v1.XyChart.Axis; - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @param message Axis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** + * Decodes an Axis message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.Axis; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** + * Decodes an Axis message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.Axis; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** + * Verifies an Axis message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates an Axis message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Axis + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.Axis; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @param message Axis + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.XyChart.Axis, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * Converts this Axis to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + namespace Axis { - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** Scale enum. */ + enum Scale { + SCALE_UNSPECIFIED = 0, + LINEAR = 1, + LOG10 = 2 + } + } + } - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** Properties of a ChartOptions. */ + interface IChartOptions { - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** ChartOptions mode */ + mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode|null); + } - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** Represents a ChartOptions. */ + class ChartOptions implements IChartOptions { - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Constructs a new ChartOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); - /** - * 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; + /** ChartOptions mode. */ + public mode: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode); - /** - * 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; + /** + * Creates a new ChartOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ChartOptions instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IChartOptions): google.monitoring.dashboard.v1.ChartOptions; - /** - * 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; + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IChartOptions, 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; + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @param message ChartOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ChartOptions; - /** - * 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); + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ChartOptions; - /** - * 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; + /** + * Verifies a ChartOptions message. + * @param message Plain object 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 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 }; + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChartOptions + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ChartOptions; - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @param message ChartOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** + * Converts this ChartOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + namespace ChartOptions { - /** FieldOptions packed */ - packed?: (boolean|null); + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + COLOR = 1, + X_RAY = 2, + STATS = 3 + } + } - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Represents a DashboardsService */ + class DashboardsService extends $protobuf.rpc.Service { - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** + * Constructs a new DashboardsService 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); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** + * Creates new DashboardsService 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): DashboardsService; - /** FieldOptions weak */ - weak?: (boolean|null); + /** + * Calls CreateDashboard. + * @param request CreateDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback): void; - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Calls CreateDashboard. + * @param request CreateDashboardRequest message or plain object + * @returns Promise + */ + public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest): Promise; - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** + * Calls ListDashboards. + * @param request ListDashboardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDashboardsResponse + */ + public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest, callback: google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback): void; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** + * Calls ListDashboards. + * @param request ListDashboardsRequest message or plain object + * @returns Promise + */ + public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest): Promise; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * Calls GetDashboard. + * @param request GetDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback): void; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * Calls GetDashboard. + * @param request GetDashboardRequest message or plain object + * @returns Promise + */ + public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest): Promise; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** + * Calls DeleteDashboard. + * @param request DeleteDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback): void; - /** FieldOptions packed. */ - public packed: boolean; + /** + * Calls DeleteDashboard. + * @param request DeleteDashboardRequest message or plain object + * @returns Promise + */ + public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest): Promise; - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * Calls UpdateDashboard. + * @param request UpdateDashboardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Dashboard + */ + public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback): void; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Calls UpdateDashboard. + * @param request UpdateDashboardRequest message or plain object + * @returns Promise + */ + public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest): Promise; + } - /** FieldOptions deprecated. */ - public deprecated: boolean; + namespace DashboardsService { - /** FieldOptions weak. */ - public weak: boolean; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type CreateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * @param error Error, if any + * @param [response] ListDashboardsResponse + */ + type ListDashboardsCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.ListDashboardsResponse) => void; - /** - * 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; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type GetDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; - /** - * 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; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDashboardCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * 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; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * @param error Error, if any + * @param [response] Dashboard + */ + type UpdateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + } - /** - * 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; + /** Properties of a CreateDashboardRequest. */ + interface ICreateDashboardRequest { - /** - * 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; + /** CreateDashboardRequest parent */ + parent?: (string|null); - /** - * 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); + /** CreateDashboardRequest dashboard */ + dashboard?: (google.monitoring.dashboard.v1.IDashboard|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; + /** CreateDashboardRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** - * 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 }; + /** Represents a CreateDashboardRequest. */ + class CreateDashboardRequest implements ICreateDashboardRequest { - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new CreateDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest); - namespace FieldOptions { + /** CreateDashboardRequest parent. */ + public parent: string; - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** CreateDashboardRequest dashboard. */ + public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } + /** CreateDashboardRequest validateOnly. */ + public validateOnly: boolean; - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** + * Creates a new CreateDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest): google.monitoring.dashboard.v1.CreateDashboardRequest; - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @param message CreateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** + * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @param message CreateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.CreateDashboardRequest; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.CreateDashboardRequest; - /** - * 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; + /** + * Verifies a CreateDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.CreateDashboardRequest; - /** - * 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; + /** + * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. + * @param message CreateDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.CreateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this CreateDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListDashboardsRequest. */ + interface IListDashboardsRequest { - /** - * 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); + /** ListDashboardsRequest parent */ + parent?: (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; + /** ListDashboardsRequest pageSize */ + pageSize?: (number|null); - /** - * 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 }; + /** ListDashboardsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a ListDashboardsRequest. */ + class ListDashboardsRequest implements IListDashboardsRequest { - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** + * Constructs a new ListDashboardsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest); - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** ListDashboardsRequest parent. */ + public parent: string; - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** ListDashboardsRequest pageSize. */ + public pageSize: number; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** ListDashboardsRequest pageToken. */ + public pageToken: string; - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** + * Creates a new ListDashboardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDashboardsRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest): google.monitoring.dashboard.v1.ListDashboardsRequest; - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + /** + * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @param message ListDashboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** + * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @param message ListDashboardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsRequest; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsRequest; - /** - * 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; + /** + * Verifies a ListDashboardsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDashboardsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsRequest; - /** - * 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; + /** + * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. + * @param message ListDashboardsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ListDashboardsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ListDashboardsResponse. */ + interface IListDashboardsResponse { - /** - * 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); + /** ListDashboardsResponse dashboards */ + dashboards?: (google.monitoring.dashboard.v1.IDashboard[]|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; + /** ListDashboardsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * 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 }; + /** Represents a ListDashboardsResponse. */ + class ListDashboardsResponse implements IListDashboardsResponse { - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ListDashboardsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse); - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** ListDashboardsResponse dashboards. */ + public dashboards: google.monitoring.dashboard.v1.IDashboard[]; - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** ListDashboardsResponse nextPageToken. */ + public nextPageToken: string; - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a new ListDashboardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDashboardsResponse instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse): google.monitoring.dashboard.v1.ListDashboardsResponse; - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** + * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @param message ListDashboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** + * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @param message ListDashboardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsResponse; - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsResponse; - /** - * 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; + /** + * Verifies a ListDashboardsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified 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; + /** + * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDashboardsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsResponse; - /** - * 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; + /** + * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. + * @param message ListDashboardsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this ListDashboardsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a GetDashboardRequest. */ + interface IGetDashboardRequest { - /** - * 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); + /** GetDashboardRequest name */ + name?: (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; + /** Represents a GetDashboardRequest. */ + class GetDashboardRequest implements IGetDashboardRequest { - /** - * 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 }; + /** + * Constructs a new GetDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest); - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GetDashboardRequest name. */ + public name: string; - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** + * Creates a new GetDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest): google.monitoring.dashboard.v1.GetDashboardRequest; - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** + * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @param message GetDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. + * @param message GetDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GetDashboardRequest; - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** + * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GetDashboardRequest; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Verifies a GetDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** + * Creates a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GetDashboardRequest; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** + * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * @param message GetDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.GetDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Converts this GetDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a DeleteDashboardRequest. */ + interface IDeleteDashboardRequest { - /** - * 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; + /** DeleteDashboardRequest name */ + name?: (string|null); + } - /** - * 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; + /** Represents a DeleteDashboardRequest. */ + class DeleteDashboardRequest implements IDeleteDashboardRequest { - /** - * 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; + /** + * Constructs a new DeleteDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest); - /** - * 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; + /** DeleteDashboardRequest name. */ + public name: string; - /** - * 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 new DeleteDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest): google.monitoring.dashboard.v1.DeleteDashboardRequest; - /** - * 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; + /** + * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @param message DeleteDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @param message DeleteDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.DeleteDashboardRequest; - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.DeleteDashboardRequest; - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** + * Verifies a DeleteDashboardRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** + * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.DeleteDashboardRequest; - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. + * @param message DeleteDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.DeleteDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** + * Converts this DeleteDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } + /** Properties of an UpdateDashboardRequest. */ + interface IUpdateDashboardRequest { - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** UpdateDashboardRequest dashboard */ + dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** UpdateDashboardRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** Represents an UpdateDashboardRequest. */ + class UpdateDashboardRequest implements IUpdateDashboardRequest { - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** + * Constructs a new UpdateDashboardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** UpdateDashboardRequest dashboard. */ + public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); - /** - * 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; + /** UpdateDashboardRequest validateOnly. */ + public validateOnly: boolean; - /** - * 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; + /** + * Creates a new UpdateDashboardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDashboardRequest instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest): google.monitoring.dashboard.v1.UpdateDashboardRequest; - /** - * 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; + /** + * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @param message UpdateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, 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; + /** + * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @param message UpdateDashboardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.UpdateDashboardRequest; - /** - * 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); + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.UpdateDashboardRequest; - /** - * 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; + /** + * Verifies an UpdateDashboardRequest message. + * @param message Plain object 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 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 }; + /** + * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDashboardRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.UpdateDashboardRequest; - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. + * @param message UpdateDashboardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.UpdateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDashboardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } + } - namespace MethodOptions { + /** Namespace api. */ + namespace api { - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } + /** 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 an UninterpretedOption. */ - interface IUninterpretedOption { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** ResourceDescriptor plural */ + plural?: (string|null); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** ResourceDescriptor singular */ + singular?: (string|null); - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new UninterpretedOption. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUninterpretedOption); + constructor(properties?: google.api.IResourceDescriptor); - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** ResourceDescriptor type. */ + public type: string; - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + /** ResourceDescriptor nameField. */ + public nameField: string; - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** ResourceDescriptor plural. */ + public plural: string; - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** ResourceDescriptor singular. */ + public singular: string; - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * 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.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * 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.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * 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 UninterpretedOption + * @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.protobuf.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies an UninterpretedOption message. + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * 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.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; + namespace ResourceDescriptor { - /** NamePart isExtension */ - isExtension: boolean; + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 } - /** 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 }; + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 } } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new SourceCodeInfo. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.api.IResourceReference); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns ResourceReference instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * 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.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, 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 + * 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.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * 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 SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a SourceCodeInfo message. + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * 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.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this ResourceReference 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; + /** Properties of a Distribution. */ + interface IDistribution { - /** Location trailingComments. */ - public trailingComments: string; + /** Distribution count */ + count?: (number|Long|string|null); - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** Distribution mean */ + mean?: (number|null); - /** - * 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; + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); - /** - * 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; + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); - /** - * 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; + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * 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; + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); - /** - * 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; + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } - /** - * 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); + /** Represents a Distribution. */ + class Distribution implements IDistribution { - /** - * 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; + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); - /** - * 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 }; + /** Distribution count. */ + public count: (number|Long|string); - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Distribution mean. */ + public mean: number; - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Distribution instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Distribution instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.api.IDistribution): google.api.Distribution; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution 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; + public static encode(message: google.api.IDistribution, 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 + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution 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; + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Distribution message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo + * @returns Distribution * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Distribution message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @returns Distribution * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Distribution message. * @param message Plain object 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. + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Distribution */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.api.Distribution; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Distribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); + namespace Distribution { - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** Properties of a Range. */ + interface IRange { - /** Annotation begin */ - begin?: (number|null); + /** Range min */ + min?: (number|null); - /** Annotation end */ - end?: (number|null); + /** Range max */ + max?: (number|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a Range. */ + class Range implements IRange { /** - * Constructs a new Annotation. + * Constructs a new Range. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; + constructor(properties?: google.api.Distribution.IRange); - /** Annotation begin. */ - public begin: number; + /** Range min. */ + public min: number; - /** Annotation end. */ - public end: number; + /** Range max. */ + public max: number; /** - * Creates a new Annotation instance using the specified properties. + * Creates a new Range instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns Range instance */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; /** - * 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 + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range 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; + public static encode(message: google.api.Distribution.IRange, 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 + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range 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; + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a Range message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns Range * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Range; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a Range message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns Range * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Range; /** - * Verifies an Annotation message. + * Verifies a Range message. * @param message Plain 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. + * Creates a Range message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns Range */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this Range 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 BucketOptions. */ + interface IBucketOptions { - /** Properties of a FieldMask. */ - interface IFieldMask { + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - /** FieldMask paths */ - paths?: (string[]|null); - } + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { - /** FieldMask paths. */ - public paths: string[]; + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); - /** - * 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; + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - /** - * 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; + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - /** - * 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; + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - /** - * 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; + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); - /** - * 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; + /** + * Creates a new BucketOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketOptions instance + */ + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; - /** - * 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); + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketOptions + * @throws {Error} If the payload is not 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.Distribution.BucketOptions; - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketOptions + * @throws {Error} If the payload 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.Distribution.BucketOptions; - /** Namespace monitoring. */ - namespace monitoring { + /** + * Verifies a BucketOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Namespace dashboard. */ - namespace dashboard { + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketOptions + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; - /** Namespace v1. */ - namespace v1 { + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an Aggregation. */ - interface IAggregation { + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Aggregation alignmentPeriod */ - alignmentPeriod?: (google.protobuf.IDuration|null); + namespace BucketOptions { - /** Aggregation perSeriesAligner */ - perSeriesAligner?: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner|null); + /** Properties of a Linear. */ + interface ILinear { - /** Aggregation crossSeriesReducer */ - crossSeriesReducer?: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer|null); + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** Aggregation groupByFields */ - groupByFields?: (string[]|null); + /** Linear width */ + width?: (number|null); + + /** Linear offset */ + offset?: (number|null); } - /** Represents an Aggregation. */ - class Aggregation implements IAggregation { + /** Represents a Linear. */ + class Linear implements ILinear { /** - * Constructs a new Aggregation. + * Constructs a new Linear. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IAggregation); - - /** Aggregation alignmentPeriod. */ - public alignmentPeriod?: (google.protobuf.IDuration|null); + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - /** Aggregation perSeriesAligner. */ - public perSeriesAligner: (google.monitoring.dashboard.v1.Aggregation.Aligner|keyof typeof google.monitoring.dashboard.v1.Aggregation.Aligner); + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; - /** Aggregation crossSeriesReducer. */ - public crossSeriesReducer: (google.monitoring.dashboard.v1.Aggregation.Reducer|keyof typeof google.monitoring.dashboard.v1.Aggregation.Reducer); + /** Linear width. */ + public width: number; - /** Aggregation groupByFields. */ - public groupByFields: string[]; + /** Linear offset. */ + public offset: number; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new Linear instance using the specified properties. * @param [properties] Properties to set - * @returns Aggregation instance + * @returns Linear instance */ - public static create(properties?: google.monitoring.dashboard.v1.IAggregation): google.monitoring.dashboard.v1.Aggregation; + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a Linear message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Aggregation + * @returns Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Aggregation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Linear; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a Linear message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Aggregation + * @returns Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Aggregation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Linear; /** - * Verifies an Aggregation message. + * Verifies a Linear message. * @param message Plain 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 Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a Linear message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Aggregation + * @returns Linear */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Aggregation; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. - * @param message Aggregation + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Aggregation to JSON. + * Converts this Linear to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Aggregation { - - /** Aligner enum. */ - enum Aligner { - ALIGN_NONE = 0, - ALIGN_DELTA = 1, - ALIGN_RATE = 2, - ALIGN_INTERPOLATE = 3, - ALIGN_NEXT_OLDER = 4, - ALIGN_MIN = 10, - ALIGN_MAX = 11, - ALIGN_MEAN = 12, - ALIGN_COUNT = 13, - ALIGN_SUM = 14, - ALIGN_STDDEV = 15, - ALIGN_COUNT_TRUE = 16, - ALIGN_COUNT_FALSE = 24, - ALIGN_FRACTION_TRUE = 17, - ALIGN_PERCENTILE_99 = 18, - ALIGN_PERCENTILE_95 = 19, - ALIGN_PERCENTILE_50 = 20, - ALIGN_PERCENTILE_05 = 21, - ALIGN_PERCENT_CHANGE = 23 - } - - /** Reducer enum. */ - enum Reducer { - REDUCE_NONE = 0, - REDUCE_MEAN = 1, - REDUCE_MIN = 2, - REDUCE_MAX = 3, - REDUCE_SUM = 4, - REDUCE_STDDEV = 5, - REDUCE_COUNT = 6, - REDUCE_COUNT_TRUE = 7, - REDUCE_COUNT_FALSE = 15, - REDUCE_FRACTION_TRUE = 8, - REDUCE_PERCENTILE_99 = 9, - REDUCE_PERCENTILE_95 = 10, - REDUCE_PERCENTILE_50 = 11, - REDUCE_PERCENTILE_05 = 12 - } - } - - /** Properties of a PickTimeSeriesFilter. */ - interface IPickTimeSeriesFilter { + /** Properties of an Exponential. */ + interface IExponential { - /** PickTimeSeriesFilter rankingMethod */ - rankingMethod?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null); + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** PickTimeSeriesFilter numTimeSeries */ - numTimeSeries?: (number|null); + /** Exponential growthFactor */ + growthFactor?: (number|null); - /** PickTimeSeriesFilter direction */ - direction?: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null); + /** Exponential scale */ + scale?: (number|null); } - /** Represents a PickTimeSeriesFilter. */ - class PickTimeSeriesFilter implements IPickTimeSeriesFilter { + /** Represents an Exponential. */ + class Exponential implements IExponential { /** - * Constructs a new PickTimeSeriesFilter. + * Constructs a new Exponential. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter); + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - /** PickTimeSeriesFilter rankingMethod. */ - public rankingMethod: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method); + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; - /** PickTimeSeriesFilter numTimeSeries. */ - public numTimeSeries: number; + /** Exponential growthFactor. */ + public growthFactor: number; - /** PickTimeSeriesFilter direction. */ - public direction: (google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|keyof typeof google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction); + /** Exponential scale. */ + public scale: number; /** - * Creates a new PickTimeSeriesFilter instance using the specified properties. + * Creates a new Exponential instance using the specified properties. * @param [properties] Properties to set - * @returns PickTimeSeriesFilter instance + * @returns Exponential instance */ - public static create(properties?: google.monitoring.dashboard.v1.IPickTimeSeriesFilter): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; /** - * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @param message PickTimeSeriesFilter message or plain object to encode + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @param message PickTimeSeriesFilter message or plain object to encode + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IPickTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * Decodes an Exponential message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PickTimeSeriesFilter + * @returns Exponential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Exponential; /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * Decodes an Exponential message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PickTimeSeriesFilter + * @returns Exponential * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Exponential; /** - * Verifies a PickTimeSeriesFilter message. + * Verifies an Exponential message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PickTimeSeriesFilter + * @returns Exponential */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.PickTimeSeriesFilter; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; /** - * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. - * @param message PickTimeSeriesFilter + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.PickTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PickTimeSeriesFilter to JSON. + * Converts this Exponential to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace PickTimeSeriesFilter { - - /** Method enum. */ - enum Method { - METHOD_UNSPECIFIED = 0, - METHOD_MEAN = 1, - METHOD_MAX = 2, - METHOD_MIN = 3, - METHOD_SUM = 4, - METHOD_LATEST = 5 - } - - /** Direction enum. */ - enum Direction { - DIRECTION_UNSPECIFIED = 0, - TOP = 1, - BOTTOM = 2 - } - } - - /** Properties of a StatisticalTimeSeriesFilter. */ - interface IStatisticalTimeSeriesFilter { - - /** StatisticalTimeSeriesFilter rankingMethod */ - rankingMethod?: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null); + /** Properties of an Explicit. */ + interface IExplicit { - /** StatisticalTimeSeriesFilter numTimeSeries */ - numTimeSeries?: (number|null); + /** Explicit bounds */ + bounds?: (number[]|null); } - /** Represents a StatisticalTimeSeriesFilter. */ - class StatisticalTimeSeriesFilter implements IStatisticalTimeSeriesFilter { + /** Represents an Explicit. */ + class Explicit implements IExplicit { /** - * Constructs a new StatisticalTimeSeriesFilter. + * Constructs a new Explicit. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter); - - /** StatisticalTimeSeriesFilter rankingMethod. */ - public rankingMethod: (google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|keyof typeof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method); + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - /** StatisticalTimeSeriesFilter numTimeSeries. */ - public numTimeSeries: number; + /** Explicit bounds. */ + public bounds: number[]; /** - * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * Creates a new Explicit instance using the specified properties. * @param [properties] Properties to set - * @returns StatisticalTimeSeriesFilter instance + * @returns Explicit instance */ - public static create(properties?: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; /** - * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @param message StatisticalTimeSeriesFilter message or plain object to encode + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @param message StatisticalTimeSeriesFilter message or plain object to encode + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * Decodes an Explicit message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StatisticalTimeSeriesFilter + * @returns Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.BucketOptions.Explicit; /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * Decodes an Explicit message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StatisticalTimeSeriesFilter + * @returns Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.BucketOptions.Explicit; /** - * Verifies a StatisticalTimeSeriesFilter message. + * Verifies an Explicit message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StatisticalTimeSeriesFilter + * @returns Explicit */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; /** - * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. - * @param message StatisticalTimeSeriesFilter + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StatisticalTimeSeriesFilter to JSON. + * Converts this Explicit to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace StatisticalTimeSeriesFilter { + /** Properties of an Exemplar. */ + interface IExemplar { - /** Method enum. */ - enum Method { - METHOD_UNSPECIFIED = 0, - METHOD_CLUSTER_OUTLIER = 1 - } - } + /** Exemplar value */ + value?: (number|null); - /** Properties of a Dashboard. */ - interface IDashboard { + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** Dashboard name */ - name?: (string|null); + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } - /** Dashboard displayName */ - displayName?: (string|null); + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { + + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); + + /** Exemplar value. */ + public value: number; + + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; + + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @throws {Error} If the payload is not 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.Distribution.Exemplar; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @throws {Error} If the payload 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.Distribution.Exemplar; + + /** + * Verifies an Exemplar message. + * @param message Plain 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 Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Dashboard etag */ - etag?: (string|null); + /** Properties of a Http. */ + interface IHttp { - /** Dashboard gridLayout */ - gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** Dashboard mosaicLayout */ - mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** Dashboard rowLayout */ - rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + /** Represents a Http. */ + class Http implements IHttp { - /** Dashboard columnLayout */ - columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); - } + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** Represents a Dashboard. */ - class Dashboard implements IDashboard { + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * Constructs a new Dashboard. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IDashboard); + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** Dashboard name. */ - public name: string; + /** + * 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; - /** Dashboard displayName. */ - public displayName: string; + /** + * 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; - /** Dashboard etag. */ - public etag: string; + /** + * 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; - /** Dashboard gridLayout. */ - public gridLayout?: (google.monitoring.dashboard.v1.IGridLayout|null); + /** + * 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; - /** Dashboard mosaicLayout. */ - public mosaicLayout?: (google.monitoring.dashboard.v1.IMosaicLayout|null); + /** + * 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; - /** Dashboard rowLayout. */ - public rowLayout?: (google.monitoring.dashboard.v1.IRowLayout|null); + /** + * 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); - /** Dashboard columnLayout. */ - public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|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; - /** Dashboard layout. */ - public layout?: ("gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"); + /** + * 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 }; - /** - * Creates a new Dashboard instance using the specified properties. - * @param [properties] Properties to set - * @returns Dashboard instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IDashboard): google.monitoring.dashboard.v1.Dashboard; + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @param message Dashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a HttpRule. */ + interface IHttpRule { - /** - * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @param message Dashboard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboard, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule selector */ + selector?: (string|null); - /** - * Decodes a Dashboard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Dashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Dashboard; + /** HttpRule get */ + get?: (string|null); - /** - * Decodes a Dashboard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Dashboard; + /** HttpRule put */ + put?: (string|null); - /** - * Verifies a Dashboard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpRule post */ + post?: (string|null); - /** - * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dashboard - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Dashboard; + /** HttpRule delete */ + "delete"?: (string|null); - /** - * Creates a plain object from a Dashboard message. Also converts values to other types if specified. - * @param message Dashboard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Dashboard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule patch */ + patch?: (string|null); - /** - * Converts this Dashboard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** Properties of a GridLayout. */ - interface IGridLayout { + /** HttpRule body */ + body?: (string|null); - /** GridLayout columns */ - columns?: (number|Long|string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); - /** GridLayout widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); - } + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** Represents a GridLayout. */ - class GridLayout implements IGridLayout { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** - * Constructs a new GridLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IGridLayout); + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** GridLayout columns. */ - public columns: (number|Long|string); + /** HttpRule selector. */ + public selector: string; - /** GridLayout widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** HttpRule get. */ + public get?: (string|null); - /** - * Creates a new GridLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns GridLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IGridLayout): google.monitoring.dashboard.v1.GridLayout; + /** HttpRule put. */ + public put?: (string|null); - /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @param message GridLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule post. */ + public post?: (string|null); - /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @param message GridLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IGridLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); - /** - * Decodes a GridLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GridLayout; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GridLayout; + /** HttpRule body. */ + public body: string; - /** - * Verifies a GridLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpRule responseBody. */ + public responseBody: string; - /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GridLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GridLayout; + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** - * Creates a plain object from a GridLayout message. Also converts values to other types if specified. - * @param message GridLayout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.GridLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - /** - * Converts this GridLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a MosaicLayout. */ - interface IMosaicLayout { + /** + * 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; - /** MosaicLayout columns */ - columns?: (number|null); + /** + * 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; - /** MosaicLayout tiles */ - tiles?: (google.monitoring.dashboard.v1.MosaicLayout.ITile[]|null); - } + /** + * 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; - /** Represents a MosaicLayout. */ - class MosaicLayout implements IMosaicLayout { + /** + * 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; - /** - * Constructs a new MosaicLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IMosaicLayout); + /** + * 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); - /** MosaicLayout columns. */ - public columns: number; + /** + * 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; - /** MosaicLayout tiles. */ - public tiles: google.monitoring.dashboard.v1.MosaicLayout.ITile[]; + /** + * 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 }; - /** - * Creates a new MosaicLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns MosaicLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IMosaicLayout): google.monitoring.dashboard.v1.MosaicLayout; + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. - * @param message MosaicLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** - * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. - * @param message MosaicLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IMosaicLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** CustomHttpPattern kind */ + kind?: (string|null); - /** - * Decodes a MosaicLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MosaicLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout; + /** CustomHttpPattern path */ + path?: (string|null); + } - /** - * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MosaicLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout; + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { - /** - * Verifies a MosaicLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); - /** - * Creates a MosaicLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MosaicLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout; + /** CustomHttpPattern kind. */ + public kind: string; - /** - * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. - * @param message MosaicLayout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CustomHttpPattern path. */ + public path: string; - /** - * Converts this MosaicLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace MosaicLayout { + /** + * 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; - /** Properties of a Tile. */ - interface ITile { + /** + * 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; - /** Tile xPos */ - xPos?: (number|null); + /** + * 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; - /** Tile yPos */ - yPos?: (number|null); + /** + * 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); - /** Tile width */ - width?: (number|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; - /** Tile height */ - height?: (number|null); + /** + * 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 }; - /** Tile widget */ - widget?: (google.monitoring.dashboard.v1.IWidget|null); - } + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Represents a Tile. */ - class Tile implements ITile { + /** Namespace protobuf. */ + namespace protobuf { - /** - * Constructs a new Tile. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** Tile xPos. */ - public xPos: number; + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** Tile yPos. */ - public yPos: number; + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** Tile width. */ - public width: number; + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** Tile height. */ - public height: number; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** Tile widget. */ - public widget?: (google.monitoring.dashboard.v1.IWidget|null); + /** + * 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; - /** - * Creates a new Tile instance using the specified properties. - * @param [properties] Properties to set - * @returns Tile instance - */ - public static create(properties?: google.monitoring.dashboard.v1.MosaicLayout.ITile): google.monitoring.dashboard.v1.MosaicLayout.Tile; + /** + * 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 Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. - * @param message Tile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, 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; - /** - * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. - * @param message Tile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.MosaicLayout.ITile, 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 Tile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.MosaicLayout.Tile; + /** + * 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; - /** - * Decodes a Tile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.MosaicLayout.Tile; + /** + * 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); - /** - * Verifies a Tile message. - * @param message Plain object 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 Tile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tile - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.MosaicLayout.Tile; + /** + * 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 }; - /** - * Creates a plain object from a Tile message. Also converts values to other types if specified. - * @param message Tile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.MosaicLayout.Tile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Tile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** Properties of a RowLayout. */ - interface IRowLayout { + /** FileDescriptorProto name */ + name?: (string|null); - /** RowLayout rows */ - rows?: (google.monitoring.dashboard.v1.RowLayout.IRow[]|null); - } + /** FileDescriptorProto package */ + "package"?: (string|null); - /** Represents a RowLayout. */ - class RowLayout implements IRowLayout { + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** - * Constructs a new RowLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IRowLayout); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** RowLayout rows. */ - public rows: google.monitoring.dashboard.v1.RowLayout.IRow[]; + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** - * Creates a new RowLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns RowLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IRowLayout): google.monitoring.dashboard.v1.RowLayout; + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. - * @param message RowLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** - * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. - * @param message RowLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IRowLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** - * Decodes a RowLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RowLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout; + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Decodes a RowLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RowLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout; + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** - * Verifies a RowLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RowLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout; + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } - /** - * Creates a plain object from a RowLayout message. Also converts values to other types if specified. - * @param message RowLayout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.RowLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Converts this RowLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - namespace RowLayout { + /** FileDescriptorProto name. */ + public name: string; - /** Properties of a Row. */ - interface IRow { + /** FileDescriptorProto package. */ + public package: string; - /** Row weight */ - weight?: (number|Long|string|null); + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** Row widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); - } + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** Represents a Row. */ - class Row implements IRow { + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.RowLayout.IRow); + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** Row weight. */ - public weight: (number|Long|string); + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** Row widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: google.monitoring.dashboard.v1.RowLayout.IRow): google.monitoring.dashboard.v1.RowLayout.Row; + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.RowLayout.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.RowLayout.Row; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.RowLayout.Row; + /** + * 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; - /** - * Verifies a Row message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.RowLayout.Row; + /** + * 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; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.RowLayout.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * 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; - /** Properties of a ColumnLayout. */ - interface IColumnLayout { + /** + * 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); - /** ColumnLayout columns */ - columns?: (google.monitoring.dashboard.v1.ColumnLayout.IColumn[]|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; - /** Represents a ColumnLayout. */ - class ColumnLayout implements IColumnLayout { + /** + * 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 }; - /** - * Constructs a new ColumnLayout. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IColumnLayout); + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ColumnLayout columns. */ - public columns: google.monitoring.dashboard.v1.ColumnLayout.IColumn[]; + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** - * Creates a new ColumnLayout instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnLayout instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IColumnLayout): google.monitoring.dashboard.v1.ColumnLayout; + /** DescriptorProto name */ + name?: (string|null); - /** - * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @param message ColumnLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** 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); - /** - * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @param message ColumnLayout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IColumnLayout, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** - * Decodes a ColumnLayout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout; + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** - * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout; + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** - * Verifies a ColumnLayout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** - * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnLayout - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout; + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. - * @param message ColumnLayout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** - * Converts this ColumnLayout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - namespace ColumnLayout { + /** DescriptorProto name. */ + public name: string; - /** Properties of a Column. */ - interface IColumn { + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** Column weight */ - weight?: (number|Long|string|null); + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** Column widgets */ - widgets?: (google.monitoring.dashboard.v1.IWidget[]|null); - } + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** Represents a Column. */ - class Column implements IColumn { + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Constructs a new Column. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn); + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** Column weight. */ - public weight: (number|Long|string); + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** Column widgets. */ - public widgets: google.monitoring.dashboard.v1.IWidget[]; + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** - * Creates a new Column instance using the specified properties. - * @param [properties] Properties to set - * @returns Column instance - */ - public static create(properties?: google.monitoring.dashboard.v1.ColumnLayout.IColumn): google.monitoring.dashboard.v1.ColumnLayout.Column; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** - * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @param message Column message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @param message Column message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ColumnLayout.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a Column message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ColumnLayout.Column; + /** + * 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; - /** - * Decodes a Column message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ColumnLayout.Column; + /** + * 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; - /** - * Verifies a Column message. - * @param message 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 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; - /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Column - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ColumnLayout.Column; + /** + * 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; - /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @param message Column - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ColumnLayout.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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); - /** - * Converts this Column to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * 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; - /** Properties of a Widget. */ - interface IWidget { + /** + * 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 }; - /** Widget title */ - title?: (string|null); + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Widget xyChart */ - xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + namespace DescriptorProto { - /** Widget scorecard */ - scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** Widget text */ - text?: (google.monitoring.dashboard.v1.IText|null); + /** ExtensionRange start */ + start?: (number|null); - /** Widget blank */ - blank?: (google.protobuf.IEmpty|null); - } + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** Represents a Widget. */ - class Widget implements IWidget { + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** - * Constructs a new Widget. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IWidget); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** Widget title. */ - public title: string; + /** ExtensionRange start. */ + public start: number; - /** Widget xyChart. */ - public xyChart?: (google.monitoring.dashboard.v1.IXyChart|null); + /** ExtensionRange end. */ + public end: number; - /** Widget scorecard. */ - public scorecard?: (google.monitoring.dashboard.v1.IScorecard|null); + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** Widget text. */ - public text?: (google.monitoring.dashboard.v1.IText|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; - /** Widget blank. */ - public blank?: (google.protobuf.IEmpty|null); + /** + * 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; - /** Widget content. */ - public content?: ("xyChart"|"scorecard"|"text"|"blank"); + /** + * 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; - /** - * Creates a new Widget instance using the specified properties. - * @param [properties] Properties to set - * @returns Widget instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IWidget): google.monitoring.dashboard.v1.Widget; + /** + * 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; - /** - * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @param message Widget message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @param message Widget message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IWidget, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Decodes a Widget message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Widget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Widget; + /** + * 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; - /** - * Decodes a Widget message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Widget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Widget; + /** + * 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 }; - /** - * Verifies a Widget message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Widget - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Widget; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * Creates a plain object from a Widget message. Also converts values to other types if specified. - * @param message Widget - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Widget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ReservedRange start */ + start?: (number|null); - /** - * Converts this Widget to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ReservedRange end */ + end?: (number|null); + } - /** Properties of a Scorecard. */ - interface IScorecard { + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** Scorecard timeSeriesQuery */ - timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** Scorecard gaugeView */ - gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + /** ReservedRange start. */ + public start: number; - /** Scorecard sparkChartView */ - sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + /** ReservedRange end. */ + public end: number; - /** Scorecard thresholds */ - thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); - } + /** + * 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; - /** Represents a Scorecard. */ - class Scorecard implements IScorecard { + /** + * 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; - /** - * Constructs a new Scorecard. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IScorecard); + /** + * 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; - /** Scorecard timeSeriesQuery. */ - public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** + * 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; - /** Scorecard gaugeView. */ - public gaugeView?: (google.monitoring.dashboard.v1.Scorecard.IGaugeView|null); + /** + * 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; - /** Scorecard sparkChartView. */ - public sparkChartView?: (google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null); + /** + * 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); - /** Scorecard thresholds. */ - public thresholds: google.monitoring.dashboard.v1.IThreshold[]; + /** + * 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 }; - /** Scorecard dataView. */ - public dataView?: ("gaugeView"|"sparkChartView"); + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a new Scorecard instance using the specified properties. - * @param [properties] Properties to set - * @returns Scorecard instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IScorecard): google.monitoring.dashboard.v1.Scorecard; + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** - * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. - * @param message Scorecard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. - * @param message Scorecard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IScorecard, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** - * Decodes a Scorecard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scorecard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard; + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** - * Decodes a Scorecard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scorecard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard; + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Verifies a Scorecard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - /** - * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scorecard - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard; + /** + * 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; - /** - * Creates a plain object from a Scorecard message. Also converts values to other types if specified. - * @param message Scorecard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Scorecard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this Scorecard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace Scorecard { + /** + * 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; - /** Properties of a GaugeView. */ - interface IGaugeView { + /** + * 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); - /** GaugeView lowerBound */ - lowerBound?: (number|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; - /** GaugeView upperBound */ - upperBound?: (number|null); - } + /** + * 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 }; - /** Represents a GaugeView. */ - class GaugeView implements IGaugeView { + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new GaugeView. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView); + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** GaugeView lowerBound. */ - public lowerBound: number; + /** FieldDescriptorProto name */ + name?: (string|null); - /** GaugeView upperBound. */ - public upperBound: number; + /** FieldDescriptorProto number */ + number?: (number|null); - /** - * Creates a new GaugeView instance using the specified properties. - * @param [properties] Properties to set - * @returns GaugeView instance - */ - public static create(properties?: google.monitoring.dashboard.v1.Scorecard.IGaugeView): google.monitoring.dashboard.v1.Scorecard.GaugeView; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** - * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @param message GaugeView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @param message GaugeView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.IGaugeView, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * Decodes a GaugeView message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.GaugeView; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * Decodes a GaugeView message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.GaugeView; + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** - * Verifies a GaugeView message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** - * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GaugeView - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.GaugeView; + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** - * Creates a plain object from a GaugeView message. Also converts values to other types if specified. - * @param message GaugeView - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Scorecard.GaugeView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** - * Converts this GaugeView to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** Properties of a SparkChartView. */ - interface ISparkChartView { + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** SparkChartView sparkChartType */ - sparkChartType?: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType|null); + /** FieldDescriptorProto name. */ + public name: string; - /** SparkChartView minAlignmentPeriod */ - minAlignmentPeriod?: (google.protobuf.IDuration|null); - } + /** FieldDescriptorProto number. */ + public number: number; - /** Represents a SparkChartView. */ - class SparkChartView implements ISparkChartView { + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** - * Constructs a new SparkChartView. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView); + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** SparkChartView sparkChartType. */ - public sparkChartType: (google.monitoring.dashboard.v1.SparkChartType|keyof typeof google.monitoring.dashboard.v1.SparkChartType); + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** SparkChartView minAlignmentPeriod. */ - public minAlignmentPeriod?: (google.protobuf.IDuration|null); + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Creates a new SparkChartView instance using the specified properties. - * @param [properties] Properties to set - * @returns SparkChartView instance - */ - public static create(properties?: google.monitoring.dashboard.v1.Scorecard.ISparkChartView): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** - * Encodes the specified SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @param message SparkChartView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** - * Encodes the specified SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @param message SparkChartView message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.Scorecard.ISparkChartView, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** - * Decodes a SparkChartView message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** - * Decodes a SparkChartView message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** - * Verifies a SparkChartView message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - /** - * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SparkChartView - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Scorecard.SparkChartView; + /** + * 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; - /** - * Creates a plain object from a SparkChartView message. Also converts values to other types if specified. - * @param message SparkChartView - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Scorecard.SparkChartView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this SparkChartView to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * 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; - /** Properties of a TimeSeriesQuery. */ - interface ITimeSeriesQuery { + /** + * 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; - /** TimeSeriesQuery timeSeriesFilter */ - timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + /** + * 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); - /** TimeSeriesQuery timeSeriesFilterRatio */ - timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|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; - /** TimeSeriesQuery timeSeriesQueryLanguage */ - timeSeriesQueryLanguage?: (string|null); + /** + * 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 }; - /** TimeSeriesQuery unitOverride */ - unitOverride?: (string|null); - } + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a TimeSeriesQuery. */ - class TimeSeriesQuery implements ITimeSeriesQuery { + namespace FieldDescriptorProto { - /** - * Constructs a new TimeSeriesQuery. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery); + /** 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 + } - /** TimeSeriesQuery timeSeriesFilter. */ - public timeSeriesFilter?: (google.monitoring.dashboard.v1.ITimeSeriesFilter|null); + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** TimeSeriesQuery timeSeriesFilterRatio. */ - public timeSeriesFilterRatio?: (google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** TimeSeriesQuery timeSeriesQueryLanguage. */ - public timeSeriesQueryLanguage?: (string|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** TimeSeriesQuery unitOverride. */ - public unitOverride: string; + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** TimeSeriesQuery source. */ - public source?: ("timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"); + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** - * Creates a new TimeSeriesQuery instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeriesQuery instance - */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesQuery): google.monitoring.dashboard.v1.TimeSeriesQuery; + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** - * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @param message TimeSeriesQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + /** OneofDescriptorProto name. */ + public name: string; - /** - * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @param message TimeSeriesQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesQuery, writer?: $protobuf.Writer): $protobuf.Writer; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesQuery; + /** + * 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; - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesQuery; + /** + * 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; - /** - * Verifies a TimeSeriesQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeriesQuery - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesQuery; + /** + * 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; - /** - * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. - * @param message TimeSeriesQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this TimeSeriesQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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); - /** Properties of a TimeSeriesFilter. */ - interface ITimeSeriesFilter { + /** + * 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; - /** TimeSeriesFilter filter */ - filter?: (string|null); + /** + * 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 }; - /** TimeSeriesFilter aggregation */ - aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** TimeSeriesFilter secondaryAggregation */ - secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** TimeSeriesFilter pickTimeSeriesFilter */ - pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** EnumDescriptorProto name */ + name?: (string|null); - /** TimeSeriesFilter statisticalTimeSeriesFilter */ - statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); - } + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** Represents a TimeSeriesFilter. */ - class TimeSeriesFilter implements ITimeSeriesFilter { + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Constructs a new TimeSeriesFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** TimeSeriesFilter filter. */ - public filter: string; + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** TimeSeriesFilter aggregation. */ - public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** TimeSeriesFilter secondaryAggregation. */ - public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** TimeSeriesFilter pickTimeSeriesFilter. */ - public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** EnumDescriptorProto name. */ + public name: string; - /** TimeSeriesFilter statisticalTimeSeriesFilter. */ - public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** TimeSeriesFilter outputFilter. */ - public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** - * Creates a new TimeSeriesFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeriesFilter instance - */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilter): google.monitoring.dashboard.v1.TimeSeriesFilter; + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** - * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @param message TimeSeriesFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** - * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @param message TimeSeriesFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilter; + /** + * 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; - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilter; + /** + * 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; - /** - * Verifies a TimeSeriesFilter message. - * @param message 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 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; - /** - * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeriesFilter - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilter; + /** + * 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 a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. - * @param message TimeSeriesFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this TimeSeriesFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 }; - /** Properties of a TimeSeriesFilterRatio. */ - interface ITimeSeriesFilterRatio { + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** TimeSeriesFilterRatio numerator */ - numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + namespace EnumDescriptorProto { - /** TimeSeriesFilterRatio denominator */ - denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** TimeSeriesFilterRatio secondaryAggregation */ - secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** EnumReservedRange start */ + start?: (number|null); - /** TimeSeriesFilterRatio pickTimeSeriesFilter */ - pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** EnumReservedRange end */ + end?: (number|null); + } - /** TimeSeriesFilterRatio statisticalTimeSeriesFilter */ - statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); - } + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** Represents a TimeSeriesFilterRatio. */ - class TimeSeriesFilterRatio implements ITimeSeriesFilterRatio { + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** - * Constructs a new TimeSeriesFilterRatio. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio); + /** EnumReservedRange start. */ + public start: number; - /** TimeSeriesFilterRatio numerator. */ - public numerator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + /** EnumReservedRange end. */ + public end: number; - /** TimeSeriesFilterRatio denominator. */ - public denominator?: (google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null); + /** + * 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; - /** TimeSeriesFilterRatio secondaryAggregation. */ - public secondaryAggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** + * 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; - /** TimeSeriesFilterRatio pickTimeSeriesFilter. */ - public pickTimeSeriesFilter?: (google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null); + /** + * 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; - /** TimeSeriesFilterRatio statisticalTimeSeriesFilter. */ - public statisticalTimeSeriesFilter?: (google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null); + /** + * 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; - /** TimeSeriesFilterRatio outputFilter. */ - public outputFilter?: ("pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"); + /** + * 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; - /** - * Creates a new TimeSeriesFilterRatio instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeriesFilterRatio instance - */ - public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + /** + * 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); - /** - * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @param message TimeSeriesFilterRatio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @param message TimeSeriesFilterRatio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesFilterRatio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 }; - /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeriesFilterRatio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeriesFilterRatio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** - * Verifies a TimeSeriesFilterRatio message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** - * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeriesFilterRatio - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio; + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** - * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. - * @param message TimeSeriesFilterRatio - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** - * Converts this TimeSeriesFilterRatio to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - namespace TimeSeriesFilterRatio { + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** Properties of a RatioPart. */ - interface IRatioPart { + /** EnumValueDescriptorProto name. */ + public name: string; - /** RatioPart filter */ - filter?: (string|null); + /** EnumValueDescriptorProto number. */ + public number: number; - /** RatioPart aggregation */ - aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); - } + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** Represents a RatioPart. */ - class RatioPart implements IRatioPart { + /** + * 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; - /** - * Constructs a new RatioPart. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart); + /** + * 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; - /** RatioPart filter. */ - public filter: string; + /** + * 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; - /** RatioPart aggregation. */ - public aggregation?: (google.monitoring.dashboard.v1.IAggregation|null); + /** + * 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; - /** - * Creates a new RatioPart instance using the specified properties. - * @param [properties] Properties to set - * @returns RatioPart instance - */ - public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + /** + * 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; - /** - * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @param message RatioPart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @param message RatioPart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a RatioPart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + /** + * 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 }; - /** - * Decodes a RatioPart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a RatioPart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** - * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RatioPart - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart; + /** ServiceDescriptorProto name */ + name?: (string|null); - /** - * Creates a plain object from a RatioPart message. Also converts values to other types if specified. - * @param message RatioPart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** - * Converts this RatioPart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } - /** Properties of a Threshold. */ - interface IThreshold { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** Threshold label */ - label?: (string|null); + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** Threshold value */ - value?: (number|null); + /** ServiceDescriptorProto name. */ + public name: string; - /** Threshold color */ - color?: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color|null); + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** Threshold direction */ - direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); - } + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** Represents a Threshold. */ - class Threshold implements IThreshold { + /** + * 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; - /** - * Constructs a new Threshold. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IThreshold); + /** + * 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; - /** Threshold label. */ - public label: string; + /** + * 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; - /** Threshold value. */ - public value: number; + /** + * 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; - /** Threshold color. */ - public color: (google.monitoring.dashboard.v1.Threshold.Color|keyof typeof google.monitoring.dashboard.v1.Threshold.Color); + /** + * 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; - /** Threshold direction. */ - public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); + /** + * 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 new Threshold instance using the specified properties. - * @param [properties] Properties to set - * @returns Threshold instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IThreshold): google.monitoring.dashboard.v1.Threshold; + /** + * 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; - /** - * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @param message Threshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 }; - /** - * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @param message Threshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a Threshold message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Threshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Threshold; + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * Decodes a Threshold message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Threshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Threshold; + /** MethodDescriptorProto name */ + name?: (string|null); - /** - * Verifies a Threshold message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** - * Creates a Threshold message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Threshold - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Threshold; + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** - * Creates a plain object from a Threshold message. Also converts values to other types if specified. - * @param message Threshold - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Threshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** - * Converts this Threshold to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - namespace Threshold { + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** Color enum. */ - enum Color { - COLOR_UNSPECIFIED = 0, - YELLOW = 4, - RED = 6 - } + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** Direction enum. */ - enum Direction { - DIRECTION_UNSPECIFIED = 0, - ABOVE = 1, - BELOW = 2 - } - } + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** SparkChartType enum. */ - enum SparkChartType { - SPARK_CHART_TYPE_UNSPECIFIED = 0, - SPARK_LINE = 1, - SPARK_BAR = 2 - } + /** MethodDescriptorProto name. */ + public name: string; - /** Properties of a Text. */ - interface IText { + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** Text content */ - content?: (string|null); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** Text format */ - format?: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format|null); - } + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** Represents a Text. */ - class Text implements IText { + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** - * Constructs a new Text. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IText); + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; - /** Text content. */ - public content: string; + /** + * 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; - /** Text format. */ - public format: (google.monitoring.dashboard.v1.Text.Format|keyof typeof google.monitoring.dashboard.v1.Text.Format); + /** + * 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; - /** - * Creates a new Text instance using the specified properties. - * @param [properties] Properties to set - * @returns Text instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IText): google.monitoring.dashboard.v1.Text; + /** + * 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; - /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IText, 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; - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a Text message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.Text; + /** + * 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); - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.Text; + /** + * 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; - /** - * Verifies a Text message. - * @param message Plain object 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 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 }; - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Text - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.Text; + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @param message Text - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a FileOptions. */ + interface IFileOptions { - /** - * Converts this Text to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaPackage */ + javaPackage?: (string|null); - namespace Text { + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - MARKDOWN = 1, - RAW = 2 - } - } + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** Properties of a XyChart. */ - interface IXyChart { + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** XyChart dataSets */ - dataSets?: (google.monitoring.dashboard.v1.XyChart.IDataSet[]|null); + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** XyChart timeshiftDuration */ - timeshiftDuration?: (google.protobuf.IDuration|null); + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** XyChart thresholds */ - thresholds?: (google.monitoring.dashboard.v1.IThreshold[]|null); + /** FileOptions goPackage */ + goPackage?: (string|null); - /** XyChart xAxis */ - xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** XyChart yAxis */ - yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** XyChart chartOptions */ - chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); - } + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** Represents a XyChart. */ - class XyChart implements IXyChart { + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * Constructs a new XyChart. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IXyChart); + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** XyChart dataSets. */ - public dataSets: google.monitoring.dashboard.v1.XyChart.IDataSet[]; + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** XyChart timeshiftDuration. */ - public timeshiftDuration?: (google.protobuf.IDuration|null); + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** XyChart thresholds. */ - public thresholds: google.monitoring.dashboard.v1.IThreshold[]; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** XyChart xAxis. */ - public xAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** XyChart yAxis. */ - public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** XyChart chartOptions. */ - public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** - * Creates a new XyChart instance using the specified properties. - * @param [properties] Properties to set - * @returns XyChart instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IXyChart): google.monitoring.dashboard.v1.XyChart; + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** - * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @param message XyChart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** - * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @param message XyChart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IXyChart, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Decodes a XyChart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns XyChart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** - * Decodes a XyChart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns XyChart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** - * Verifies a XyChart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** - * Creates a XyChart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns XyChart - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** - * Creates a plain object from a XyChart message. Also converts values to other types if specified. - * @param message XyChart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** - * Converts this XyChart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - namespace XyChart { + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** Properties of a DataSet. */ - interface IDataSet { + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** DataSet timeSeriesQuery */ - timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** DataSet plotType */ - plotType?: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null); + /** FileOptions goPackage. */ + public goPackage: string; - /** DataSet legendTemplate */ - legendTemplate?: (string|null); + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** DataSet minAlignmentPeriod */ - minAlignmentPeriod?: (google.protobuf.IDuration|null); - } + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** Represents a DataSet. */ - class DataSet implements IDataSet { + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Constructs a new DataSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet); + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** DataSet timeSeriesQuery. */ - public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + /** FileOptions deprecated. */ + public deprecated: boolean; - /** DataSet plotType. */ - public plotType: (google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.PlotType); + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** DataSet legendTemplate. */ - public legendTemplate: string; + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** DataSet minAlignmentPeriod. */ - public minAlignmentPeriod?: (google.protobuf.IDuration|null); + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Creates a new DataSet instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSet instance - */ - public static create(properties?: google.monitoring.dashboard.v1.XyChart.IDataSet): google.monitoring.dashboard.v1.XyChart.DataSet; + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** - * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @param message DataSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** - * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @param message DataSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** - * Decodes a DataSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.DataSet; + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** - * Decodes a DataSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.DataSet; + /** 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; - /** - * Verifies a DataSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a DataSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSet - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.DataSet; + /** + * 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; - /** - * Creates a plain object from a DataSet message. Also converts values to other types if specified. - * @param message DataSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart.DataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this DataSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - namespace DataSet { + /** + * 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); - /** PlotType enum. */ - enum PlotType { - PLOT_TYPE_UNSPECIFIED = 0, - LINE = 1, - STACKED_AREA = 2, - STACKED_BAR = 3, - HEATMAP = 4 - } - } + /** + * 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; - /** Properties of an Axis. */ - interface IAxis { + /** + * 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 }; - /** Axis label */ - label?: (string|null); + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Axis scale */ - scale?: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale|null); - } + namespace FileOptions { - /** Represents an Axis. */ - class Axis implements IAxis { + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** - * Constructs a new Axis. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.XyChart.IAxis); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** Axis label. */ - public label: string; + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** Axis scale. */ - public scale: (google.monitoring.dashboard.v1.XyChart.Axis.Scale|keyof typeof google.monitoring.dashboard.v1.XyChart.Axis.Scale); + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Creates a new Axis instance using the specified properties. - * @param [properties] Properties to set - * @returns Axis instance - */ - public static create(properties?: google.monitoring.dashboard.v1.XyChart.IAxis): google.monitoring.dashboard.v1.XyChart.Axis; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @param message Axis message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** - * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @param message Axis message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.XyChart.IAxis, writer?: $protobuf.Writer): $protobuf.Writer; + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Decodes an Axis message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.XyChart.Axis; + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** - * Decodes an Axis message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.XyChart.Axis; + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** - * Verifies an Axis message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** - * Creates an Axis message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Axis - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.XyChart.Axis; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** - * Creates a plain object from an Axis message. Also converts values to other types if specified. - * @param message Axis - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.XyChart.Axis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** - * Converts this Axis to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MessageOptions deprecated. */ + public deprecated: boolean; - namespace Axis { + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** Scale enum. */ - enum Scale { - SCALE_UNSPECIFIED = 0, - LINEAR = 1, - LOG10 = 2 - } - } - } + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Properties of a ChartOptions. */ - interface IChartOptions { + /** + * 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; - /** ChartOptions mode */ - mode?: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode|null); - } + /** + * 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; - /** Represents a ChartOptions. */ - class ChartOptions implements IChartOptions { + /** + * 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; - /** - * Constructs a new ChartOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IChartOptions); + /** + * 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; - /** ChartOptions mode. */ - public mode: (google.monitoring.dashboard.v1.ChartOptions.Mode|keyof typeof google.monitoring.dashboard.v1.ChartOptions.Mode); + /** + * 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; - /** - * Creates a new ChartOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ChartOptions instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IChartOptions): google.monitoring.dashboard.v1.ChartOptions; + /** + * 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); - /** - * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @param message ChartOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @param message ChartOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IChartOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 }; - /** - * Decodes a ChartOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChartOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ChartOptions; + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ChartOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChartOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ChartOptions; + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** - * Verifies a ChartOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** - * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChartOptions - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ChartOptions; + /** FieldOptions packed */ + packed?: (boolean|null); - /** - * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. - * @param message ChartOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ChartOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** - * Converts this ChartOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions lazy */ + lazy?: (boolean|null); - namespace ChartOptions { + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - COLOR = 1, - X_RAY = 2, - STATS = 3 - } - } + /** FieldOptions weak */ + weak?: (boolean|null); - /** Represents a DashboardsService */ - class DashboardsService extends $protobuf.rpc.Service { + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Constructs a new DashboardsService 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); + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** - * Creates new DashboardsService 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): DashboardsService; + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } - /** - * Calls CreateDashboard. - * @param request CreateDashboardRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dashboard - */ - public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback): void; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** - * Calls CreateDashboard. - * @param request CreateDashboardRequest message or plain object - * @returns Promise - */ - public createDashboard(request: google.monitoring.dashboard.v1.ICreateDashboardRequest): Promise; + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** - * Calls ListDashboards. - * @param request ListDashboardsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDashboardsResponse - */ - public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest, callback: google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback): void; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** - * Calls ListDashboards. - * @param request ListDashboardsRequest message or plain object - * @returns Promise - */ - public listDashboards(request: google.monitoring.dashboard.v1.IListDashboardsRequest): Promise; + /** FieldOptions packed. */ + public packed: boolean; - /** - * Calls GetDashboard. - * @param request GetDashboardRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dashboard - */ - public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback): void; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** - * Calls GetDashboard. - * @param request GetDashboardRequest message or plain object - * @returns Promise - */ - public getDashboard(request: google.monitoring.dashboard.v1.IGetDashboardRequest): Promise; + /** FieldOptions lazy. */ + public lazy: boolean; - /** - * Calls DeleteDashboard. - * @param request DeleteDashboardRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback): void; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** - * Calls DeleteDashboard. - * @param request DeleteDashboardRequest message or plain object - * @returns Promise - */ - public deleteDashboard(request: google.monitoring.dashboard.v1.IDeleteDashboardRequest): Promise; + /** FieldOptions weak. */ + public weak: boolean; - /** - * Calls UpdateDashboard. - * @param request UpdateDashboardRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Dashboard - */ - public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest, callback: google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback): void; + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Calls UpdateDashboard. - * @param request UpdateDashboardRequest message or plain object - * @returns Promise - */ - public updateDashboard(request: google.monitoring.dashboard.v1.IUpdateDashboardRequest): Promise; - } + /** + * 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; - namespace DashboardsService { + /** + * 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; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. - * @param error Error, if any - * @param [response] Dashboard - */ - type CreateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + /** + * 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; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. - * @param error Error, if any - * @param [response] ListDashboardsResponse - */ - type ListDashboardsCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.ListDashboardsResponse) => void; + /** + * 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; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. - * @param error Error, if any - * @param [response] Dashboard - */ - type GetDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; + /** + * 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; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteDashboardCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * 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); - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. - * @param error Error, if any - * @param [response] Dashboard - */ - type UpdateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; - } + /** + * 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; - /** Properties of a CreateDashboardRequest. */ - interface ICreateDashboardRequest { + /** + * 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 }; - /** CreateDashboardRequest parent */ - parent?: (string|null); + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CreateDashboardRequest dashboard */ - dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); - } + namespace FieldOptions { - /** Represents a CreateDashboardRequest. */ - class CreateDashboardRequest implements ICreateDashboardRequest { + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** - * Constructs a new CreateDashboardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest); + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } - /** CreateDashboardRequest parent. */ - public parent: string; + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** CreateDashboardRequest dashboard. */ - public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Creates a new CreateDashboardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDashboardRequest instance - */ - public static create(properties?: google.monitoring.dashboard.v1.ICreateDashboardRequest): google.monitoring.dashboard.v1.CreateDashboardRequest; + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** - * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @param message CreateDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** - * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @param message CreateDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.ICreateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.CreateDashboardRequest; + /** + * 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; - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.CreateDashboardRequest; + /** + * 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; - /** - * Verifies a CreateDashboardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDashboardRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.CreateDashboardRequest; + /** + * 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; - /** - * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. - * @param message CreateDashboardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.CreateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this CreateDashboardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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); - /** Properties of a ListDashboardsRequest. */ - interface IListDashboardsRequest { + /** + * 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; - /** ListDashboardsRequest parent */ - parent?: (string|null); + /** + * 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 }; - /** ListDashboardsRequest pageSize */ - pageSize?: (number|null); + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListDashboardsRequest pageToken */ - pageToken?: (string|null); - } + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** Represents a ListDashboardsRequest. */ - class ListDashboardsRequest implements IListDashboardsRequest { + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** - * Constructs a new ListDashboardsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** ListDashboardsRequest parent. */ - public parent: string; + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** ListDashboardsRequest pageSize. */ - public pageSize: number; + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { - /** ListDashboardsRequest pageToken. */ - public pageToken: string; + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); - /** - * Creates a new ListDashboardsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDashboardsRequest instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsRequest): google.monitoring.dashboard.v1.ListDashboardsRequest; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** - * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @param message ListDashboardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** - * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @param message ListDashboardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsRequest; + /** + * 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; - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsRequest; + /** + * 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; - /** - * Verifies a ListDashboardsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDashboardsRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsRequest; + /** + * 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; - /** - * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. - * @param message ListDashboardsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this ListDashboardsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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); - /** Properties of a ListDashboardsResponse. */ - interface IListDashboardsResponse { + /** + * 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; - /** ListDashboardsResponse dashboards */ - dashboards?: (google.monitoring.dashboard.v1.IDashboard[]|null); + /** + * 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 }; - /** ListDashboardsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ListDashboardsResponse. */ - class ListDashboardsResponse implements IListDashboardsResponse { + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** - * Constructs a new ListDashboardsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** ListDashboardsResponse dashboards. */ - public dashboards: google.monitoring.dashboard.v1.IDashboard[]; + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** ListDashboardsResponse nextPageToken. */ - public nextPageToken: string; + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** - * Creates a new ListDashboardsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDashboardsResponse instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IListDashboardsResponse): google.monitoring.dashboard.v1.ListDashboardsResponse; + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** - * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. - * @param message ListDashboardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** - * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. - * @param message ListDashboardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IListDashboardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Decodes a ListDashboardsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDashboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.ListDashboardsResponse; + /** + * 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; - /** - * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDashboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.ListDashboardsResponse; + /** + * 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; - /** - * Verifies a ListDashboardsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified 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; - /** - * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDashboardsResponse - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.ListDashboardsResponse; + /** + * 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; - /** - * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. - * @param message ListDashboardsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.ListDashboardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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); - /** - * Converts this ListDashboardsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a GetDashboardRequest. */ - interface IGetDashboardRequest { + /** + * 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 }; - /** GetDashboardRequest name */ - name?: (string|null); - } + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a GetDashboardRequest. */ - class GetDashboardRequest implements IGetDashboardRequest { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** - * Constructs a new GetDashboardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** GetDashboardRequest name. */ - public name: string; + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Creates a new GetDashboardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDashboardRequest instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IGetDashboardRequest): google.monitoring.dashboard.v1.GetDashboardRequest; + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** - * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. - * @param message GetDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** - * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. - * @param message GetDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IGetDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** - * Decodes a GetDashboardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.GetDashboardRequest; + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** - * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.GetDashboardRequest; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** - * Verifies a GetDashboardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Creates a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDashboardRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.GetDashboardRequest; + /** + * 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; - /** - * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. - * @param message GetDashboardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.GetDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this GetDashboardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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; - /** Properties of a DeleteDashboardRequest. */ - interface IDeleteDashboardRequest { + /** + * 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; - /** DeleteDashboardRequest name */ - name?: (string|null); - } + /** + * 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; - /** Represents a DeleteDashboardRequest. */ - class DeleteDashboardRequest implements IDeleteDashboardRequest { + /** + * 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); - /** - * Constructs a new DeleteDashboardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest); + /** + * 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; - /** DeleteDashboardRequest name. */ - public name: string; + /** + * 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 }; - /** - * Creates a new DeleteDashboardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDashboardRequest instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IDeleteDashboardRequest): google.monitoring.dashboard.v1.DeleteDashboardRequest; + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. - * @param message DeleteDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** - * Encodes the specified DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. - * @param message DeleteDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IDeleteDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** - * Decodes a DeleteDashboardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.DeleteDashboardRequest; + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** - * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.DeleteDashboardRequest; + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Verifies a DeleteDashboardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - /** - * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDashboardRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.DeleteDashboardRequest; + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } - /** - * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. - * @param message DeleteDashboardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.DeleteDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { - /** - * Converts this DeleteDashboardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); - /** Properties of an UpdateDashboardRequest. */ - interface IUpdateDashboardRequest { + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** UpdateDashboardRequest dashboard */ - dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); - } + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** Represents an UpdateDashboardRequest. */ - class UpdateDashboardRequest implements IUpdateDashboardRequest { + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Constructs a new UpdateDashboardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest); + /** + * 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; - /** UpdateDashboardRequest dashboard. */ - public dashboard?: (google.monitoring.dashboard.v1.IDashboard|null); + /** + * 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; - /** - * Creates a new UpdateDashboardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDashboardRequest instance - */ - public static create(properties?: google.monitoring.dashboard.v1.IUpdateDashboardRequest): google.monitoring.dashboard.v1.UpdateDashboardRequest; + /** + * 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; - /** - * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @param message UpdateDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, 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; - /** - * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @param message UpdateDashboardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.dashboard.v1.IUpdateDashboardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.UpdateDashboardRequest; + /** + * 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); - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.UpdateDashboardRequest; + /** + * 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; - /** - * Verifies an UpdateDashboardRequest message. - * @param message Plain object 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 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 }; - /** - * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDashboardRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.UpdateDashboardRequest; + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. - * @param message UpdateDashboardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.dashboard.v1.UpdateDashboardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace MethodOptions { - /** - * Converts this UpdateDashboardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 } } - } - - /** Namespace api. */ - namespace api { - /** Properties of a Distribution. */ - interface IDistribution { + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** Distribution count */ - count?: (number|Long|string|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** Distribution mean */ - mean?: (number|null); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); } - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new Distribution. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.api.IDistribution); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** Distribution count. */ - public count: (number|Long|string); + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** Distribution mean. */ - public mean: number; + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns Distribution instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * 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.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode + * 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.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Distribution message from the specified reader or buffer. + * 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 Distribution + * @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.api.Distribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Distribution + * @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.api.Distribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a Distribution message. + * 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 a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Distribution + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution + * 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.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Distribution to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Distribution { + namespace UninterpretedOption { - /** Properties of a Range. */ - interface IRange { + /** Properties of a NamePart. */ + interface INamePart { - /** Range min */ - min?: (number|null); + /** NamePart namePart */ + namePart: string; - /** Range max */ - max?: (number|null); + /** NamePart isExtension */ + isExtension: boolean; } - /** Represents a Range. */ - class Range implements IRange { + /** Represents a NamePart. */ + class NamePart implements INamePart { /** - * Constructs a new Range. + * Constructs a new NamePart. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IRange); + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** Range min. */ - public min: number; + /** NamePart namePart. */ + public namePart: string; - /** Range max. */ - public max: number; + /** NamePart isExtension. */ + public isExtension: boolean; /** - * Creates a new Range instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @param [properties] Properties to set - * @returns Range instance + * @returns NamePart instance */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * 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.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * 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.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Range message from the specified reader or buffer. + * 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 Range + * @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.api.Distribution.Range; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Range + * @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.api.Distribution.Range; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; /** - * Verifies a Range message. + * 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 Range message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Range + * @returns NamePart */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range + * 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.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Range to JSON. + * Converts this NamePart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a BucketOptions. */ - interface IBucketOptions { + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|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); - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); } - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** Represents a Location. */ + class Location implements ILocation { /** - * Constructs a new BucketOptions. + * Constructs a new Location. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IBucketOptions); + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** Location path. */ + public path: number[]; - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Location span. */ + public span: number[]; - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Location leadingComments. */ + public leadingComments: string; - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new Location instance using the specified properties. * @param [properties] Properties to set - * @returns BucketOptions instance + * @returns Location instance */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * 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.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode + * 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.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * 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 BucketOptions + * @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.api.Distribution.BucketOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BucketOptions + * @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.api.Distribution.BucketOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; /** - * Verifies a BucketOptions message. + * 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 BucketOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BucketOptions - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; - - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BucketOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace BucketOptions { - - /** Properties of a Linear. */ - interface ILinear { - - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Linear width */ - width?: (number|null); - - /** Linear offset */ - offset?: (number|null); - } - - /** Represents a Linear. */ - class Linear implements ILinear { - - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Linear width. */ - public width: number; - - /** Linear offset. */ - public offset: number; - - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Linear; - - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @throws {Error} If the payload 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.Distribution.BucketOptions.Linear; - - /** - * Verifies a Linear message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; - - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Exponential. */ - interface IExponential { - - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Exponential growthFactor */ - growthFactor?: (number|null); - - /** Exponential scale */ - scale?: (number|null); - } - - /** Represents an Exponential. */ - class Exponential implements IExponential { - - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Exponential growthFactor. */ - public growthFactor: number; - - /** Exponential scale. */ - public scale: number; - - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; - - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Exponential; + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @throws {Error} If the payload 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.Distribution.BucketOptions.Exponential; + /** + * 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; - /** - * Verifies an Exponential message. - * @param message Plain object 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 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 }; - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } - /** Properties of an Explicit. */ - interface IExplicit { + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** Explicit bounds */ - bounds?: (number[]|null); - } + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** Represents an Explicit. */ - class Explicit implements IExplicit { + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + /** + * 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; - /** Explicit bounds. */ - public bounds: number[]; + /** + * 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; - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + /** + * 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; - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, 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; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Explicit; + /** + * 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); - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @throws {Error} If the payload 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.Distribution.BucketOptions.Explicit; + /** + * 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; - /** - * Verifies an Explicit message. - * @param message Plain object 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 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 }; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace GeneratedCodeInfo { - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Properties of an Annotation. */ + interface IAnnotation { - /** Properties of an Exemplar. */ - interface IExemplar { + /** Annotation path */ + path?: (number[]|null); - /** Exemplar value */ - value?: (number|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** Annotation begin */ + begin?: (number|null); - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); + /** Annotation end */ + end?: (number|null); } - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { + /** Represents an Annotation. */ + class Annotation implements IAnnotation { /** - * Constructs a new Exemplar. + * Constructs a new Annotation. * @param [properties] Properties to set */ - constructor(properties?: google.api.Distribution.IExemplar); + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** Exemplar value. */ - public value: number; + /** Annotation path. */ + public path: number[]; - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** Annotation sourceFile. */ + public sourceFile: string; - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; /** - * Creates a new Exemplar instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set - * @returns Exemplar instance + * @returns Annotation instance */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode + * 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.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode + * 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.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Exemplar message from the specified reader or buffer. + * 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 Exemplar + * @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.api.Distribution.Exemplar; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Exemplar + * @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.api.Distribution.Exemplar; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Verifies an Exemplar message. + * 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 Exemplar message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Exemplar + * @returns Annotation */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar + * 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.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Exemplar to JSON. + * Converts this Annotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Properties of an Any. */ + interface IAny { - /** ResourceDescriptor singular */ - singular?: (string|null); + /** Any type_url */ + type_url?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new ResourceDescriptor. + * Constructs a new Any. * @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; + constructor(properties?: google.protobuf.IAny); - /** ResourceDescriptor singular. */ - public singular: string; + /** Any type_url. */ + public type_url: string; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns Any instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a ResourceDescriptor message. + * Verifies an Any message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Any 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 { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** ResourceReference type */ - type?: (string|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** ResourceReference childType */ - childType?: (string|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new ResourceReference. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.ITimestamp); - /** ResourceReference type. */ - public type: string; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** ResourceReference childType. */ - public childType: string; + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns Timestamp instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * 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 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.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, 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 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.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * 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 ResourceReference + * @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.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @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.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a ResourceReference message. + * 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * 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 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.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Http. */ - interface IHttp { + /** Properties of a Duration. */ + interface IDuration { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Http. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IDuration); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** Duration seconds. */ + public seconds: (number|Long|string); - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Http instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns Duration instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @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.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @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.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Http message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * 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.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this Duration 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); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new HttpRule. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns Empty instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, 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 + * 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.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @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.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @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.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a HttpRule message. + * Verifies an Empty message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * 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.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** CustomHttpPattern path */ - path?: (string|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new CustomHttpPattern. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; + constructor(properties?: google.protobuf.IFieldMask); - /** CustomHttpPattern path. */ - public path: string; + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns FieldMask instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, 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 + * 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.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies a CustomHttpPattern message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * 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.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 86b5e9d1aaf..9ffd1b63928 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -39,9777 +39,8293 @@ */ var google = {}; - google.protobuf = (function() { + google.monitoring = (function() { /** - * Namespace protobuf. + * Namespace monitoring. * @memberof google * @namespace */ - var protobuf = {}; - - 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 - */ + var monitoring = {}; - /** - * 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]]; - } + monitoring.dashboard = (function() { /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance + * Namespace dashboard. + * @memberof google.monitoring + * @namespace */ - Any.prototype.type_url = ""; + var dashboard = {}; - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); + dashboard.v1 = (function() { - /** - * 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); - }; + /** + * Namespace v1. + * @memberof google.monitoring.dashboard + * @namespace + */ + var v1 = {}; - /** - * 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; - }; + v1.AlertChart = (function() { - /** - * 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(); - }; + /** + * Properties of an AlertChart. + * @memberof google.monitoring.dashboard.v1 + * @interface IAlertChart + * @property {string|null} [name] AlertChart name + */ - /** - * 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; + /** + * Constructs a new AlertChart. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents an AlertChart. + * @implements IAlertChart + * @constructor + * @param {google.monitoring.dashboard.v1.IAlertChart=} [properties] Properties to set + */ + function AlertChart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes 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()); - }; + /** + * AlertChart name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.AlertChart + * @instance + */ + AlertChart.prototype.name = ""; - /** - * 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 a new AlertChart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {google.monitoring.dashboard.v1.IAlertChart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.AlertChart} AlertChart instance + */ + AlertChart.create = function create(properties) { + return new AlertChart(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified AlertChart message. Does not implicitly {@link google.monitoring.dashboard.v1.AlertChart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {google.monitoring.dashboard.v1.IAlertChart} message AlertChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlertChart.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; + }; - /** - * 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; - }; + /** + * Encodes the specified AlertChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.AlertChart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {google.monitoring.dashboard.v1.IAlertChart} message AlertChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlertChart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - })(); + /** + * Decodes an AlertChart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.AlertChart} AlertChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlertChart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.AlertChart(); + 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; + }; - protobuf.Timestamp = (function() { + /** + * Decodes an AlertChart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.AlertChart} AlertChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlertChart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ + /** + * Verifies an AlertChart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlertChart.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; + }; - /** - * 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]]; - } + /** + * Creates an AlertChart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.AlertChart} AlertChart + */ + AlertChart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.AlertChart) + return object; + var message = new $root.google.monitoring.dashboard.v1.AlertChart(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates a plain object from an AlertChart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {google.monitoring.dashboard.v1.AlertChart} message AlertChart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlertChart.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; + }; - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + /** + * Converts this AlertChart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.AlertChart + * @instance + * @returns {Object.} JSON object + */ + AlertChart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return AlertChart; + })(); - /** - * 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; - }; + v1.Aggregation = (function() { - /** - * 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(); - }; + /** + * Properties of an Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @interface IAggregation + * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod + * @property {google.monitoring.dashboard.v1.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner + * @property {google.monitoring.dashboard.v1.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer + * @property {Array.|null} [groupByFields] Aggregation groupByFields + */ - /** - * 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; + /** + * Constructs a new Aggregation. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + this.groupByFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a 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()); - }; + /** + * Aggregation alignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.alignmentPeriod = null; - /** - * 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); - }; + /** + * Aggregation perSeriesAligner. + * @member {google.monitoring.dashboard.v1.Aggregation.Aligner} perSeriesAligner + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.perSeriesAligner = 0; - return Timestamp; - })(); + /** + * Aggregation crossSeriesReducer. + * @member {google.monitoring.dashboard.v1.Aggregation.Reducer} crossSeriesReducer + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.crossSeriesReducer = 0; - protobuf.Duration = (function() { + /** + * Aggregation groupByFields. + * @member {Array.} groupByFields + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + */ + Aggregation.prototype.groupByFields = $util.emptyArray; - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) + $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); + if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); + if (message.groupByFields != null && message.groupByFields.length) + for (var i = 0; i < message.groupByFields.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + return writer; + }; - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.perSeriesAligner = reader.int32(); + break; + case 4: + message.crossSeriesReducer = reader.int32(); + break; + case 5: + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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.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; + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); + if (error) + return "alignmentPeriod." + error; } - } - 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(); - }; + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + switch (message.perSeriesAligner) { + default: + return "perSeriesAligner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 24: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + break; + } + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + switch (message.crossSeriesReducer) { + default: + return "crossSeriesReducer: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { + if (!Array.isArray(message.groupByFields)) + return "groupByFields: array expected"; + for (var i = 0; i < message.groupByFields.length; ++i) + if (!$util.isString(message.groupByFields[i])) + return "groupByFields: string[] expected"; + } + return null; + }; - /** - * 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) { + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Aggregation) + return object; + var message = new $root.google.monitoring.dashboard.v1.Aggregation(); + if (object.alignmentPeriod != null) { + if (typeof object.alignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.alignmentPeriod: object expected"); + message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + } + switch (object.perSeriesAligner) { + case "ALIGN_NONE": + case 0: + message.perSeriesAligner = 0; + break; + case "ALIGN_DELTA": case 1: - message.start = reader.int32(); + message.perSeriesAligner = 1; break; + case "ALIGN_RATE": case 2: - message.end = reader.int32(); + message.perSeriesAligner = 2; break; - default: - reader.skipType(tag & 7); + case "ALIGN_INTERPOLATE": + case 3: + message.perSeriesAligner = 3; 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; + case "ALIGN_NEXT_OLDER": + case 4: + message.perSeriesAligner = 4; + break; + case "ALIGN_MIN": + case 10: + message.perSeriesAligner = 10; + break; + case "ALIGN_MAX": + case 11: + message.perSeriesAligner = 11; + break; + case "ALIGN_MEAN": + case 12: + message.perSeriesAligner = 12; + break; + case "ALIGN_COUNT": + case 13: + message.perSeriesAligner = 13; + break; + case "ALIGN_SUM": + case 14: + message.perSeriesAligner = 14; + break; + case "ALIGN_STDDEV": + case 15: + message.perSeriesAligner = 15; + break; + case "ALIGN_COUNT_TRUE": + case 16: + message.perSeriesAligner = 16; + break; + case "ALIGN_COUNT_FALSE": + case 24: + message.perSeriesAligner = 24; + break; + case "ALIGN_FRACTION_TRUE": + case 17: + message.perSeriesAligner = 17; + break; + case "ALIGN_PERCENTILE_99": + case 18: + message.perSeriesAligner = 18; + break; + case "ALIGN_PERCENTILE_95": + case 19: + message.perSeriesAligner = 19; + break; + case "ALIGN_PERCENTILE_50": + case 20: + message.perSeriesAligner = 20; + break; + case "ALIGN_PERCENTILE_05": + case 21: + message.perSeriesAligner = 21; + break; + case "ALIGN_PERCENT_CHANGE": + case 23: + message.perSeriesAligner = 23; + break; + } + switch (object.crossSeriesReducer) { + case "REDUCE_NONE": + case 0: + message.crossSeriesReducer = 0; + break; + case "REDUCE_MEAN": + case 1: + message.crossSeriesReducer = 1; + break; + case "REDUCE_MIN": + case 2: + message.crossSeriesReducer = 2; + break; + case "REDUCE_MAX": + case 3: + message.crossSeriesReducer = 3; + break; + case "REDUCE_SUM": + case 4: + message.crossSeriesReducer = 4; + break; + case "REDUCE_STDDEV": + case 5: + message.crossSeriesReducer = 5; + break; + case "REDUCE_COUNT": + case 6: + message.crossSeriesReducer = 6; + break; + case "REDUCE_COUNT_TRUE": + case 7: + message.crossSeriesReducer = 7; + break; + case "REDUCE_COUNT_FALSE": + case 15: + message.crossSeriesReducer = 15; + break; + case "REDUCE_FRACTION_TRUE": + case 8: + message.crossSeriesReducer = 8; + break; + case "REDUCE_PERCENTILE_99": + case 9: + message.crossSeriesReducer = 9; + break; + case "REDUCE_PERCENTILE_95": + case 10: + message.crossSeriesReducer = 10; + break; + case "REDUCE_PERCENTILE_50": + case 11: + message.crossSeriesReducer = 11; + break; + case "REDUCE_PERCENTILE_05": + case 12: + message.crossSeriesReducer = 12; + break; + } + if (object.groupByFields) { + if (!Array.isArray(object.groupByFields)) + throw TypeError(".google.monitoring.dashboard.v1.Aggregation.groupByFields: array expected"); + message.groupByFields = []; + for (var i = 0; i < object.groupByFields.length; ++i) + message.groupByFields[i] = String(object.groupByFields[i]); + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {google.monitoring.dashboard.v1.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupByFields = []; + if (options.defaults) { + object.alignmentPeriod = null; + object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; + object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + } + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + if (message.groupByFields && message.groupByFields.length) { + object.groupByFields = []; + for (var j = 0; j < message.groupByFields.length; ++j) + object.groupByFields[j] = message.groupByFields[j]; + } + return object; + }; - /** - * 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; - }; + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + /** + * Aligner enum. + * @name google.monitoring.dashboard.v1.Aggregation.Aligner + * @enum {number} + * @property {number} ALIGN_NONE=0 ALIGN_NONE value + * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value + * @property {number} ALIGN_RATE=2 ALIGN_RATE value + * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value + * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value + * @property {number} ALIGN_MIN=10 ALIGN_MIN value + * @property {number} ALIGN_MAX=11 ALIGN_MAX value + * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value + * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value + * @property {number} ALIGN_SUM=14 ALIGN_SUM value + * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value + * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value + * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value + * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value + * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value + * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value + * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value + * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value + * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value + */ + Aggregation.Aligner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALIGN_NONE"] = 0; + values[valuesById[1] = "ALIGN_DELTA"] = 1; + values[valuesById[2] = "ALIGN_RATE"] = 2; + values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; + values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; + values[valuesById[10] = "ALIGN_MIN"] = 10; + values[valuesById[11] = "ALIGN_MAX"] = 11; + values[valuesById[12] = "ALIGN_MEAN"] = 12; + values[valuesById[13] = "ALIGN_COUNT"] = 13; + values[valuesById[14] = "ALIGN_SUM"] = 14; + values[valuesById[15] = "ALIGN_STDDEV"] = 15; + values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; + values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; + values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; + values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; + values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; + values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; + values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; + values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; + return values; + })(); - /** - * 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; - }; + /** + * Reducer enum. + * @name google.monitoring.dashboard.v1.Aggregation.Reducer + * @enum {number} + * @property {number} REDUCE_NONE=0 REDUCE_NONE value + * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value + * @property {number} REDUCE_MIN=2 REDUCE_MIN value + * @property {number} REDUCE_MAX=3 REDUCE_MAX value + * @property {number} REDUCE_SUM=4 REDUCE_SUM value + * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value + * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value + * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value + * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value + * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value + * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value + * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value + * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value + * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value + */ + Aggregation.Reducer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDUCE_NONE"] = 0; + values[valuesById[1] = "REDUCE_MEAN"] = 1; + values[valuesById[2] = "REDUCE_MIN"] = 2; + values[valuesById[3] = "REDUCE_MAX"] = 3; + values[valuesById[4] = "REDUCE_SUM"] = 4; + values[valuesById[5] = "REDUCE_STDDEV"] = 5; + values[valuesById[6] = "REDUCE_COUNT"] = 6; + values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; + values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; + values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; + values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; + values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; + values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; + values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; + return values; + })(); - /** - * 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()); - }; + return Aggregation; + })(); - /** - * 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; - }; + v1.PickTimeSeriesFilter = (function() { - /** - * 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]); + /** + * Properties of a PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IPickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null} [rankingMethod] PickTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] PickTimeSeriesFilter numTimeSeries + * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null} [direction] PickTimeSeriesFilter direction + */ + + /** + * Constructs a new PickTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a PickTimeSeriesFilter. + * @implements IPickTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + */ + function PickTimeSeriesFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * 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; - }; + /** + * PickTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.rankingMethod = 0; - /** - * 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); - }; + /** + * PickTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.numTimeSeries = 0; - return ExtensionRangeOptions; - })(); + /** + * PickTimeSeriesFilter direction. + * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction} direction + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + */ + PickTimeSeriesFilter.prototype.direction = 0; - protobuf.FieldDescriptorProto = (function() { + /** + * Creates a new PickTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter instance + */ + PickTimeSeriesFilter.create = function create(properties) { + return new PickTimeSeriesFilter(properties); + }; - /** - * 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 - */ + /** + * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); + return writer; + }; - /** - * 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]]; - } + /** + * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PickTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + case 3: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + /** + * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PickTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * Verifies a PickTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PickTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter + */ + PickTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_MEAN": + case 1: + message.rankingMethod = 1; + break; + case "METHOD_MAX": + case 2: + message.rankingMethod = 2; + break; + case "METHOD_MIN": + case 3: + message.rankingMethod = 3; + break; + case "METHOD_SUM": + case 4: + message.rankingMethod = 4; + break; + case "METHOD_LATEST": + case 5: + message.rankingMethod = 5; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "TOP": + case 1: + message.direction = 1; + break; + case "BOTTOM": + case 2: + message.direction = 2; + break; + } + return message; + }; - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.PickTimeSeriesFilter} message PickTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PickTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction[message.direction] : message.direction; + return object; + }; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * Converts this PickTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + PickTimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + /** + * Method enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method + * @enum {number} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_MEAN=1 METHOD_MEAN value + * @property {number} METHOD_MAX=2 METHOD_MAX value + * @property {number} METHOD_MIN=3 METHOD_MIN value + * @property {number} METHOD_SUM=4 METHOD_SUM value + * @property {number} METHOD_LATEST=5 METHOD_LATEST value + */ + PickTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_MEAN"] = 1; + values[valuesById[2] = "METHOD_MAX"] = 2; + values[valuesById[3] = "METHOD_MIN"] = 3; + values[valuesById[4] = "METHOD_SUM"] = 4; + values[valuesById[5] = "METHOD_LATEST"] = 5; + return values; + })(); - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction + * @enum {number} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} BOTTOM=2 BOTTOM value + */ + PickTimeSeriesFilter.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "BOTTOM"] = 2; + return values; + })(); - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + return PickTimeSeriesFilter; + })(); - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + v1.StatisticalTimeSeriesFilter = (function() { + + /** + * Properties of a StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface IStatisticalTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null} [rankingMethod] StatisticalTimeSeriesFilter rankingMethod + * @property {number|null} [numTimeSeries] StatisticalTimeSeriesFilter numTimeSeries + */ - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * Constructs a new StatisticalTimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a StatisticalTimeSeriesFilter. + * @implements IStatisticalTimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + */ + function StatisticalTimeSeriesFilter(properties) { + if (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 proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; + /** + * StatisticalTimeSeriesFilter rankingMethod. + * @member {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method} rankingMethod + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.rankingMethod = 0; - /** - * 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); - }; + /** + * StatisticalTimeSeriesFilter numTimeSeries. + * @member {number} numTimeSeries + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + */ + StatisticalTimeSeriesFilter.prototype.numTimeSeries = 0; - /** - * 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; - }; + /** + * Creates a new StatisticalTimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter instance + */ + StatisticalTimeSeriesFilter.create = function create(properties) { + return new StatisticalTimeSeriesFilter(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); + if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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()); - }; + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rankingMethod = reader.int32(); + break; + case 2: + message.numTimeSeries = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTimeSeriesFilter.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; - }; + /** + * Verifies a StatisticalTimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticalTimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + switch (message.rankingMethod) { + default: + return "rankingMethod: enum value expected"; + case 0: + case 1: + break; + } + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + if (!$util.isInteger(message.numTimeSeries)) + return "numTimeSeries: integer 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 StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter + */ + StatisticalTimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); + switch (object.rankingMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.rankingMethod = 0; + break; + case "METHOD_CLUSTER_OUTLIER": + case 1: + message.rankingMethod = 1; + break; + } + if (object.numTimeSeries != null) + message.numTimeSeries = object.numTimeSeries | 0; + 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; - }; + /** + * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticalTimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.numTimeSeries = 0; + } + if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) + object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; + if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) + object.numTimeSeries = message.numTimeSeries; + 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); - }; + /** + * Converts this StatisticalTimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + StatisticalTimeSeriesFilter.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; - })(); + /** + * Method enum. + * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method + * @enum {number} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value + */ + StatisticalTimeSeriesFilter.Method = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "METHOD_CLUSTER_OUTLIER"] = 1; + 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 StatisticalTimeSeriesFilter; + })(); - return FieldDescriptorProto; - })(); + v1.Dashboard = (function() { - protobuf.OneofDescriptorProto = (function() { + /** + * Properties of a Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @interface IDashboard + * @property {string|null} [name] Dashboard name + * @property {string|null} [displayName] Dashboard displayName + * @property {string|null} [etag] Dashboard etag + * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout + * @property {google.monitoring.dashboard.v1.IMosaicLayout|null} [mosaicLayout] Dashboard mosaicLayout + * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout + * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + */ - /** - * 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 Dashboard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Dashboard. + * @implements IDashboard + * @constructor + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + */ + function Dashboard(properties) { + if (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 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]]; - } + /** + * Dashboard name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.name = ""; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * Dashboard displayName. + * @member {string} displayName + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.displayName = ""; + + /** + * Dashboard etag. + * @member {string} etag + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.etag = ""; + + /** + * Dashboard gridLayout. + * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.gridLayout = null; - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * Dashboard mosaicLayout. + * @member {google.monitoring.dashboard.v1.IMosaicLayout|null|undefined} mosaicLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.mosaicLayout = 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); - }; + /** + * Dashboard rowLayout. + * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.rowLayout = null; - /** - * 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; - }; + /** + * Dashboard columnLayout. + * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.columnLayout = null; - /** - * 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(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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; - }; + /** + * Dashboard layout. + * @member {"gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"|undefined} layout + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Object.defineProperty(Dashboard.prototype, "layout", { + get: $util.oneOfGetter($oneOfFields = ["gridLayout", "mosaicLayout", "rowLayout", "columnLayout"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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()); - }; + /** + * Creates a new Dashboard instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance + */ + Dashboard.create = function create(properties) { + return new Dashboard(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) + $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mosaicLayout != null && Object.hasOwnProperty.call(message, "mosaicLayout")) + $root.google.monitoring.dashboard.v1.MosaicLayout.encode(message.mosaicLayout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) + $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) + $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dashboard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dashboard message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 4: + message.etag = reader.string(); + break; + case 5: + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); + break; + case 6: + message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.decode(reader, reader.uint32()); + break; + case 8: + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); + break; + case 9: + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + 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; - }; + /** + * Decodes a Dashboard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dashboard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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); - }; + /** + * Verifies a Dashboard message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dashboard.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); + if (error) + return "gridLayout." + error; + } + } + if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.MosaicLayout.verify(message.mosaicLayout); + if (error) + return "mosaicLayout." + error; + } + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); + if (error) + return "rowLayout." + error; + } + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + if (properties.layout === 1) + return "layout: multiple values"; + properties.layout = 1; + { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); + if (error) + return "columnLayout." + error; + } + } + return null; + }; - return OneofDescriptorProto; - })(); + /** + * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard + */ + Dashboard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) + return object; + var message = new $root.google.monitoring.dashboard.v1.Dashboard(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.etag != null) + message.etag = String(object.etag); + if (object.gridLayout != null) { + if (typeof object.gridLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); + } + if (object.mosaicLayout != null) { + if (typeof object.mosaicLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.mosaicLayout: object expected"); + message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.fromObject(object.mosaicLayout); + } + if (object.rowLayout != null) { + if (typeof object.rowLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); + } + if (object.columnLayout != null) { + if (typeof object.columnLayout !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); + } + return message; + }; - protobuf.EnumDescriptorProto = (function() { + /** + * Creates a plain object from a Dashboard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dashboard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { + object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); + if (options.oneofs) + object.layout = "gridLayout"; + } + if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { + object.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.toObject(message.mosaicLayout, options); + if (options.oneofs) + object.layout = "mosaicLayout"; + } + if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { + object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); + if (options.oneofs) + object.layout = "rowLayout"; + } + if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { + object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); + if (options.oneofs) + object.layout = "columnLayout"; + } + return object; + }; - /** - * 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 - */ + /** + * Converts this Dashboard to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + * @returns {Object.} JSON object + */ + Dashboard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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]]; - } + return Dashboard; + })(); - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + v1.GridLayout = (function() { - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + /** + * Properties of a GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets + */ - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Constructs a new GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GridLayout. + * @implements IGridLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + */ + function GridLayout(properties) { + this.widgets = []; + if (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 reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.widgets = $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); - }; + /** + * Creates a new GridLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + */ + GridLayout.create = function create(properties) { + return new GridLayout(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 GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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(); - }; + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.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 a GridLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + 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()); - }; + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.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; - }; + /** + * Verifies a GridLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GridLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + 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 GridLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + */ + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + else if (typeof object.columns === "string") + message.columns = parseInt(object.columns, 10); + else if (typeof object.columns === "number") + message.columns = object.columns; + else if (typeof object.columns === "object") + message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[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; - }; + /** + * Creates a plain object from a GridLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GridLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.columns = options.longs === String ? "0" : 0; + if (message.columns != null && message.hasOwnProperty("columns")) + if (typeof message.columns === "number") + object.columns = options.longs === String ? String(message.columns) : message.columns; + else + object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + 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); - }; + /** + * Converts this GridLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + * @returns {Object.} JSON object + */ + GridLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - EnumDescriptorProto.EnumReservedRange = (function() { + return GridLayout; + })(); - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ + v1.MosaicLayout = (function() { - /** - * 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]]; - } + /** + * Properties of a MosaicLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IMosaicLayout + * @property {number|null} [columns] MosaicLayout columns + * @property {Array.|null} [tiles] MosaicLayout tiles + */ - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; + /** + * Constructs a new MosaicLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a MosaicLayout. + * @implements IMosaicLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set + */ + function MosaicLayout(properties) { + this.tiles = []; + if (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 end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; + /** + * MosaicLayout columns. + * @member {number} columns + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + */ + MosaicLayout.prototype.columns = 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); - }; + /** + * MosaicLayout tiles. + * @member {Array.} tiles + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + */ + MosaicLayout.prototype.tiles = $util.emptyArray; - /** - * 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; - }; + /** + * Creates a new MosaicLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout instance + */ + MosaicLayout.create = function create(properties) { + return new MosaicLayout(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MosaicLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.columns); + if (message.tiles != null && message.tiles.length) + for (var i = 0; i < message.tiles.length; ++i) + $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.encode(message.tiles[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * 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; + /** + * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MosaicLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MosaicLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int32(); + break; + case 3: + if (!(message.tiles && message.tiles.length)) + message.tiles = []; + message.tiles.push($root.google.monitoring.dashboard.v1.MosaicLayout.Tile.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MosaicLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MosaicLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MosaicLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns)) + return "columns: integer expected"; + if (message.tiles != null && message.hasOwnProperty("tiles")) { + if (!Array.isArray(message.tiles)) + return "tiles: array expected"; + for (var i = 0; i < message.tiles.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.verify(message.tiles[i]); + if (error) + return "tiles." + error; + } } - } - 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()); - }; + return null; + }; - /** - * 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 a MosaicLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + */ + MosaicLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); + if (object.columns != null) + message.columns = object.columns | 0; + if (object.tiles) { + if (!Array.isArray(object.tiles)) + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: array expected"); + message.tiles = []; + for (var i = 0; i < object.tiles.length; ++i) { + if (typeof object.tiles[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: object expected"); + message.tiles[i] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.fromObject(object.tiles[i]); + } + } + return message; + }; - /** - * 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) + /** + * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout} message MosaicLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MosaicLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tiles = []; + if (options.defaults) + object.columns = 0; + if (message.columns != null && message.hasOwnProperty("columns")) + object.columns = message.columns; + if (message.tiles && message.tiles.length) { + object.tiles = []; + for (var j = 0; j < message.tiles.length; ++j) + object.tiles[j] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.toObject(message.tiles[j], options); + } 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 MosaicLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @instance + * @returns {Object.} JSON object + */ + MosaicLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + MosaicLayout.Tile = (function() { - return EnumReservedRange; - })(); + /** + * Properties of a Tile. + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @interface ITile + * @property {number|null} [xPos] Tile xPos + * @property {number|null} [yPos] Tile yPos + * @property {number|null} [width] Tile width + * @property {number|null} [height] Tile height + * @property {google.monitoring.dashboard.v1.IWidget|null} [widget] Tile widget + */ - return EnumDescriptorProto; - })(); + /** + * Constructs a new Tile. + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @classdesc Represents a Tile. + * @implements ITile + * @constructor + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set + */ + function Tile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.EnumValueDescriptorProto = (function() { + /** + * Tile xPos. + * @member {number} xPos + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.xPos = 0; - /** - * 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 - */ + /** + * Tile yPos. + * @member {number} yPos + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.yPos = 0; - /** - * 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]]; - } + /** + * Tile width. + * @member {number} width + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.width = 0; - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; + /** + * Tile height. + * @member {number} height + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.height = 0; + + /** + * Tile widget. + * @member {google.monitoring.dashboard.v1.IWidget|null|undefined} widget + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + */ + Tile.prototype.widget = null; + + /** + * Creates a new Tile instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile instance + */ + Tile.create = function create(properties) { + return new Tile(properties); + }; - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; + /** + * Encodes the specified Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.xPos != null && Object.hasOwnProperty.call(message, "xPos")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.xPos); + if (message.yPos != null && Object.hasOwnProperty.call(message, "yPos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.yPos); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height); + if (message.widget != null && Object.hasOwnProperty.call(message, "widget")) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widget, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; + /** + * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a Tile message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.xPos = reader.int32(); + break; + case 2: + message.yPos = reader.int32(); + break; + case 3: + message.width = reader.int32(); + break; + case 4: + message.height = reader.int32(); + break; + case 5: + message.widget = $root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a Tile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a Tile message. + * @function verify + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.xPos != null && message.hasOwnProperty("xPos")) + if (!$util.isInteger(message.xPos)) + return "xPos: integer expected"; + if (message.yPos != null && message.hasOwnProperty("yPos")) + if (!$util.isInteger(message.yPos)) + return "yPos: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + if (message.widget != null && message.hasOwnProperty("widget")) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widget); + if (error) + return "widget." + error; + } + return null; + }; - /** - * 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; - }; + /** + * Creates a Tile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile + */ + Tile.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout.Tile) + return object; + var message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); + if (object.xPos != null) + message.xPos = object.xPos | 0; + if (object.yPos != null) + message.yPos = object.yPos | 0; + if (object.width != null) + message.width = object.width | 0; + if (object.height != null) + message.height = object.height | 0; + if (object.widget != null) { + if (typeof object.widget !== "object") + throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.Tile.widget: object expected"); + message.widget = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widget); + } + return message; + }; + + /** + * Creates a plain object from a Tile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {google.monitoring.dashboard.v1.MosaicLayout.Tile} message Tile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.xPos = 0; + object.yPos = 0; + object.width = 0; + object.height = 0; + object.widget = null; + } + if (message.xPos != null && message.hasOwnProperty("xPos")) + object.xPos = message.xPos; + if (message.yPos != null && message.hasOwnProperty("yPos")) + object.yPos = message.yPos; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.widget != null && message.hasOwnProperty("widget")) + object.widget = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widget, options); + return object; + }; - /** - * 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()); - }; + /** + * Converts this Tile to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @instance + * @returns {Object.} JSON object + */ + Tile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return Tile; + })(); - /** - * 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; - }; + return MosaicLayout; + })(); - /** - * 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; - }; + v1.RowLayout = (function() { - /** - * 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); - }; + /** + * Properties of a RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IRowLayout + * @property {Array.|null} [rows] RowLayout rows + */ - return EnumValueDescriptorProto; - })(); + /** + * Constructs a new RowLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a RowLayout. + * @implements IRowLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + */ + function RowLayout(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.ServiceDescriptorProto = (function() { + /** + * RowLayout rows. + * @member {Array.} rows + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + */ + RowLayout.prototype.rows = $util.emptyArray; - /** - * 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 - */ + /** + * Creates a new RowLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + */ + RowLayout.create = function create(properties) { + return new RowLayout(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RowLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + /** + * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + /** + * Verifies a RowLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return 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); - }; + /** + * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + */ + RowLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); + message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); + } + } + return message; + }; - /** - * 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; - }; + /** + * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + } + return object; + }; - /** - * 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(); - }; + /** + * Converts this RowLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout + * @instance + * @returns {Object.} JSON object + */ + RowLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + RowLayout.Row = (function() { - /** - * 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()); - }; + /** + * Properties of a Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @interface IRow + * @property {number|Long|null} [weight] Row weight + * @property {Array.|null} [widgets] Row widgets + */ - /** - * 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; - }; + /** + * Constructs a new Row. + * @memberof google.monitoring.dashboard.v1.RowLayout + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.widgets = []; + if (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 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; - }; + /** + * Row weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * 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; - }; + /** + * Row widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + */ + Row.prototype.widgets = $util.emptyArray; - /** - * 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); - }; + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; - return ServiceDescriptorProto; - })(); + /** + * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - protobuf.MethodDescriptorProto = (function() { + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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 - */ + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) + return object; + var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; - /** - * 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]]; - } + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + return Row; + })(); - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + return RowLayout; + })(); - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + v1.ColumnLayout = (function() { - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * Properties of a ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IColumnLayout + * @property {Array.|null} [columns] ColumnLayout columns + */ - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Constructs a new ColumnLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ColumnLayout. + * @implements IColumnLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + */ + function ColumnLayout(properties) { + this.columns = []; + if (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 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); - }; + /** + * ColumnLayout columns. + * @member {Array.} columns + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + */ + ColumnLayout.prototype.columns = $util.emptyArray; - /** - * 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; - }; + /** + * Creates a new ColumnLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance + */ + ColumnLayout.create = function create(properties) { + return new ColumnLayout(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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()); - }; + /** + * Decodes a ColumnLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a ColumnLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; - /** - * 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; - }; + /** + * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout + */ + ColumnLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); + message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); + } + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnLayout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); + } + return object; + }; + + /** + * Converts this ColumnLayout to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @instance + * @returns {Object.} JSON object + */ + ColumnLayout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MethodDescriptorProto; - })(); + ColumnLayout.Column = (function() { - protobuf.FileOptions = (function() { + /** + * Properties of a Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @interface IColumn + * @property {number|Long|null} [weight] Column weight + * @property {Array.|null} [widgets] Column widgets + */ - /** - * 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 Column. + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + */ + function Column(properties) { + this.widgets = []; + if (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 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]]; - } + /** + * Column weight. + * @member {number|Long} weight + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * Column widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + */ + Column.prototype.widgets = $util.emptyArray; - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.weight = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * Verifies a Column message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) + return "weight: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column + */ + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) + return object; + var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); + if (object.weight != null) + if ($util.Long) + (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; + else if (typeof object.weight === "string") + message.weight = parseInt(object.weight, 10); + else if (typeof object.weight === "number") + message.weight = object.weight; + else if (typeof object.weight === "object") + message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); + if (object.widgets) { + if (!Array.isArray(object.widgets)) + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); + message.widgets = []; + for (var i = 0; i < object.widgets.length; ++i) { + if (typeof object.widgets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); + message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); + } + } + return message; + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.widgets = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.weight = options.longs === String ? "0" : 0; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight === "number") + object.weight = options.longs === String ? String(message.weight) : message.weight; + else + object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; + if (message.widgets && message.widgets.length) { + object.widgets = []; + for (var j = 0; j < message.widgets.length; ++j) + object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + return object; + }; - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; + return Column; + })(); - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + return ColumnLayout; + })(); - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + v1.Widget = (function() { - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * Properties of a Widget. + * @memberof google.monitoring.dashboard.v1 + * @interface IWidget + * @property {string|null} [title] Widget title + * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart + * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard + * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text + * @property {google.protobuf.IEmpty|null} [blank] Widget blank + * @property {google.monitoring.dashboard.v1.IAlertChart|null} [alertChart] Widget alertChart + */ - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * Constructs a new Widget. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Widget. + * @implements IWidget + * @constructor + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + */ + function Widget(properties) { + if (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 swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * Widget title. + * @member {string} title + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.title = ""; - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * Widget xyChart. + * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.xyChart = null; - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * Widget scorecard. + * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.scorecard = null; - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + /** + * Widget text. + * @member {google.monitoring.dashboard.v1.IText|null|undefined} text + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.text = null; - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * Widget blank. + * @member {google.protobuf.IEmpty|null|undefined} blank + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.blank = null; - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Widget alertChart. + * @member {google.monitoring.dashboard.v1.IAlertChart|null|undefined} alertChart + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.alertChart = null; - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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); - }; + /** + * Widget content. + * @member {"xyChart"|"scorecard"|"text"|"blank"|"alertChart"|undefined} content + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Object.defineProperty(Widget.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank", "alertChart"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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; - }; + /** + * Creates a new Widget instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Widget} Widget instance + */ + Widget.create = function create(properties) { + return new Widget(properties); + }; - /** - * 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(); - }; + /** + * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.xyChart != null && Object.hasOwnProperty.call(message, "xyChart")) + $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.scorecard != null && Object.hasOwnProperty.call(message, "scorecard")) + $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.blank != null && Object.hasOwnProperty.call(message, "blank")) + $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.alertChart != null && Object.hasOwnProperty.call(message, "alertChart")) + $root.google.monitoring.dashboard.v1.AlertChart.encode(message.alertChart, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Widget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Widget message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + break; + case 3: + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); + break; + case 4: + message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); + break; + case 5: + message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + case 7: + message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.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()); - }; + /** + * Decodes a Widget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Widget} Widget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Widget.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; - }; + /** + * Verifies a Widget message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Widget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); + if (error) + return "xyChart." + error; + } + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); + if (error) + return "scorecard." + error; + } + } + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.blank != null && message.hasOwnProperty("blank")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.protobuf.Empty.verify(message.blank); + if (error) + return "blank." + error; + } + } + if (message.alertChart != null && message.hasOwnProperty("alertChart")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.AlertChart.verify(message.alertChart); + if (error) + return "alertChart." + error; + } + } + return null; + }; + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Widget} Widget + */ + Widget.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Widget) + return object; + var message = new $root.google.monitoring.dashboard.v1.Widget(); + if (object.title != null) + message.title = String(object.title); + if (object.xyChart != null) { + if (typeof object.xyChart !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); + } + if (object.scorecard != null) { + if (typeof object.scorecard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); + } + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); + message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); + } + if (object.blank != null) { + if (typeof object.blank !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); + message.blank = $root.google.protobuf.Empty.fromObject(object.blank); + } + if (object.alertChart != null) { + if (typeof object.alertChart !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.alertChart: object expected"); + message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.fromObject(object.alertChart); + } + return message; + }; + + /** + * Creates a plain object from a Widget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {google.monitoring.dashboard.v1.Widget} message Widget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Widget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.xyChart != null && message.hasOwnProperty("xyChart")) { + object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); + if (options.oneofs) + object.content = "xyChart"; + } + if (message.scorecard != null && message.hasOwnProperty("scorecard")) { + object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); + if (options.oneofs) + object.content = "scorecard"; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); + if (options.oneofs) + object.content = "text"; + } + if (message.blank != null && message.hasOwnProperty("blank")) { + object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); + if (options.oneofs) + object.content = "blank"; + } + if (message.alertChart != null && message.hasOwnProperty("alertChart")) { + object.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.toObject(message.alertChart, options); + if (options.oneofs) + object.content = "alertChart"; + } + return object; + }; - /** - * 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; - }; + /** + * Converts this Widget to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + * @returns {Object.} JSON object + */ + Widget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return Widget; + })(); - /** - * 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); - }; + v1.Scorecard = (function() { - /** - * 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; - })(); + /** + * Properties of a Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @interface IScorecard + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery + * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView + * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView + * @property {Array.|null} [thresholds] Scorecard thresholds + */ + + /** + * Constructs a new Scorecard. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Scorecard. + * @implements IScorecard + * @constructor + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + */ + function Scorecard(properties) { + this.thresholds = []; + if (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 FileOptions; - })(); + /** + * Scorecard timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.timeSeriesQuery = null; - protobuf.MessageOptions = (function() { + /** + * Scorecard gaugeView. + * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.gaugeView = null; - /** - * 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 - */ + /** + * Scorecard sparkChartView. + * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.sparkChartView = null; - /** - * 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]]; - } + /** + * Scorecard thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Scorecard.prototype.thresholds = $util.emptyArray; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Scorecard dataView. + * @member {"gaugeView"|"sparkChartView"|undefined} dataView + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + */ + Object.defineProperty(Scorecard.prototype, "dataView", { + get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Creates a new Scorecard instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance + */ + Scorecard.create = function create(properties) { + return new Scorecard(properties); + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scorecard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gaugeView != null && Object.hasOwnProperty.call(message, "gaugeView")) + $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sparkChartView != null && Object.hasOwnProperty.call(message, "sparkChartView")) + $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scorecard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; + /** + * Decodes a Scorecard message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scorecard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 4: + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); + break; + case 5: + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scorecard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scorecard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scorecard message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scorecard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); + if (error) + return "gaugeView." + error; + } + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + if (properties.dataView === 1) + return "dataView: multiple values"; + properties.dataView = 1; + { + var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); + if (error) + return "sparkChartView." + error; + } + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; + } + } + return 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); - }; + /** + * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard + */ + Scorecard.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + if (object.gaugeView != null) { + if (typeof object.gaugeView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); + } + if (object.sparkChartView != null) { + if (typeof object.sparkChartView !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } + } + return message; + }; - /** - * 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; - }; + /** + * Creates a plain object from a Scorecard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scorecard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.thresholds = []; + if (options.defaults) + object.timeSeriesQuery = null; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { + object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); + if (options.oneofs) + object.dataView = "gaugeView"; + } + if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { + object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); + if (options.oneofs) + object.dataView = "sparkChartView"; + } + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + } + return object; + }; - /** - * 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(); - }; + /** + * Converts this Scorecard to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard + * @instance + * @returns {Object.} JSON object + */ + Scorecard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + Scorecard.GaugeView = (function() { - /** - * 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()); - }; + /** + * Properties of a GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface IGaugeView + * @property {number|null} [lowerBound] GaugeView lowerBound + * @property {number|null} [upperBound] GaugeView upperBound + */ - /** - * 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; - }; + /** + * Constructs a new GaugeView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a GaugeView. + * @implements IGaugeView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + */ + function GaugeView(properties) { + if (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 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; - }; + /** + * GaugeView lowerBound. + * @member {number} lowerBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.lowerBound = 0; - /** - * 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; - }; + /** + * GaugeView upperBound. + * @member {number} upperBound + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + */ + GaugeView.prototype.upperBound = 0; - /** - * 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); - }; + /** + * Creates a new GaugeView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance + */ + GaugeView.create = function create(properties) { + return new GaugeView(properties); + }; - return MessageOptions; - })(); + /** + * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); + return writer; + }; - protobuf.FieldOptions = (function() { + /** + * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GaugeView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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 - */ + /** + * Decodes a GaugeView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lowerBound = reader.double(); + break; + case 2: + message.upperBound = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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]]; - } + /** + * Decodes a GaugeView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GaugeView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GaugeView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GaugeView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + if (typeof message.lowerBound !== "number") + return "lowerBound: number expected"; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + if (typeof message.upperBound !== "number") + return "upperBound: number expected"; + return null; + }; + + /** + * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView + */ + GaugeView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); + if (object.lowerBound != null) + message.lowerBound = Number(object.lowerBound); + if (object.upperBound != null) + message.upperBound = Number(object.upperBound); + return message; + }; - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Creates a plain object from a GaugeView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GaugeView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = 0; + object.upperBound = 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; + return object; + }; - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Converts this GaugeView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @instance + * @returns {Object.} JSON object + */ + GaugeView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + return GaugeView; + })(); - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + Scorecard.SparkChartView = (function() { - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Properties of a SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @interface ISparkChartView + * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod + */ - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Constructs a new SparkChartView. + * @memberof google.monitoring.dashboard.v1.Scorecard + * @classdesc Represents a SparkChartView. + * @implements ISparkChartView + * @constructor + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + */ + function SparkChartView(properties) { + if (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 uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * SparkChartView sparkChartType. + * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.sparkChartType = 0; - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * SparkChartView minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + */ + SparkChartView.prototype.minAlignmentPeriod = null; - /** - * 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 SparkChartView instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance + */ + SparkChartView.create = function create(properties) { + return new SparkChartView(properties); + }; - /** - * 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 SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sparkChartType != null && Object.hasOwnProperty.call(message, "sparkChartType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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 SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkChartView message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sparkChartType = reader.int32(); + break; + case 2: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 SparkChartView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkChartView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a SparkChartView message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkChartView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + switch (message.sparkChartType) { + default: + return "sparkChartType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; - /** - * 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()); - }; + /** + * Creates a SparkChartView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView + */ + SparkChartView.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) + return object; + var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); + switch (object.sparkChartType) { + case "SPARK_CHART_TYPE_UNSPECIFIED": + case 0: + message.sparkChartType = 0; + break; + case "SPARK_LINE": + case 1: + message.sparkChartType = 1; + break; + case "SPARK_BAR": + case 2: + message.sparkChartType = 2; + break; + } + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + return message; + }; - /** - * 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 plain object from a SparkChartView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkChartView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; + object.minAlignmentPeriod = null; + } + if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) + object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; - /** - * 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; - }; + /** + * Converts this SparkChartView to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @instance + * @returns {Object.} JSON object + */ + SparkChartView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return SparkChartView; + })(); - /** - * 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); - }; + return Scorecard; + })(); - /** - * 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; - })(); + v1.TimeSeriesQuery = (function() { - /** - * 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; - })(); + /** + * Properties of a TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesQuery + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter + * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio + * @property {string|null} [timeSeriesQueryLanguage] TimeSeriesQuery timeSeriesQueryLanguage + * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride + */ + + /** + * Constructs a new TimeSeriesQuery. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesQuery. + * @implements ITimeSeriesQuery + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + */ + function TimeSeriesQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesQuery timeSeriesFilter. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilter = null; + + /** + * TimeSeriesQuery timeSeriesFilterRatio. + * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesFilterRatio = null; - return FieldOptions; - })(); + /** + * TimeSeriesQuery timeSeriesQueryLanguage. + * @member {string|null|undefined} timeSeriesQueryLanguage + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.timeSeriesQueryLanguage = null; - protobuf.OneofOptions = (function() { + /** + * TimeSeriesQuery unitOverride. + * @member {string} unitOverride + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + TimeSeriesQuery.prototype.unitOverride = ""; - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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]]; - } + /** + * TimeSeriesQuery source. + * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"|undefined} source + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + */ + Object.defineProperty(TimeSeriesQuery.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio", "timeSeriesQueryLanguage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Creates a new TimeSeriesQuery instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance + */ + TimeSeriesQuery.create = function create(properties) { + return new TimeSeriesQuery(properties); + }; - /** - * 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 TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesFilter != null && Object.hasOwnProperty.call(message, "timeSeriesFilter")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSeriesFilterRatio != null && Object.hasOwnProperty.call(message, "timeSeriesFilterRatio")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSeriesQueryLanguage != null && Object.hasOwnProperty.call(message, "timeSeriesQueryLanguage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.timeSeriesQueryLanguage); + if (message.unitOverride != null && Object.hasOwnProperty.call(message, "unitOverride")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); + return writer; + }; - /** - * 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 TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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 a TimeSeriesQuery message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 2: + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); + break; + case 3: + message.timeSeriesQueryLanguage = reader.string(); + break; + case 5: + message.unitOverride = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 a TimeSeriesQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesQuery message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); + if (error) + return "timeSeriesFilter." + error; + } + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); + if (error) + return "timeSeriesFilterRatio." + error; + } + } + if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.timeSeriesQueryLanguage)) + return "timeSeriesQueryLanguage: string expected"; + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + if (!$util.isString(message.unitOverride)) + return "unitOverride: string expected"; + return null; + }; - /** - * 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()); - }; + /** + * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery + */ + TimeSeriesQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); + if (object.timeSeriesFilter != null) { + if (typeof object.timeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); + } + if (object.timeSeriesFilterRatio != null) { + if (typeof object.timeSeriesFilterRatio !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); + } + if (object.timeSeriesQueryLanguage != null) + message.timeSeriesQueryLanguage = String(object.timeSeriesQueryLanguage); + if (object.unitOverride != null) + message.unitOverride = String(object.unitOverride); + return message; + }; - /** - * 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 a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unitOverride = ""; + if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { + object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); + if (options.oneofs) + object.source = "timeSeriesFilter"; + } + if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { + object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); + if (options.oneofs) + object.source = "timeSeriesFilterRatio"; + } + if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { + object.timeSeriesQueryLanguage = message.timeSeriesQueryLanguage; + if (options.oneofs) + object.source = "timeSeriesQueryLanguage"; + } + if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) + object.unitOverride = message.unitOverride; + return object; + }; - /** - * 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; - }; + /** + * Converts this TimeSeriesQuery to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return TimeSeriesQuery; + })(); - /** - * 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); - }; + v1.TimeSeriesFilter = (function() { - return OneofOptions; - })(); + /** + * Properties of a TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesFilter + * @property {string|null} [filter] TimeSeriesFilter filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilter secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter + */ - protobuf.EnumOptions = (function() { + /** + * Constructs a new TimeSeriesFilter. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesFilter. + * @implements ITimeSeriesFilter + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + */ + function TimeSeriesFilter(properties) { + if (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 EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + /** + * TimeSeriesFilter filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.filter = ""; - /** - * 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]]; - } + /** + * TimeSeriesFilter aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.aggregation = null; - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * TimeSeriesFilter secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.secondaryAggregation = null; - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + /** + * TimeSeriesFilter pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.pickTimeSeriesFilter = null; - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * TimeSeriesFilter statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; - /** - * 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); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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; - }; + /** + * TimeSeriesFilter outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + */ + Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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(); - }; + /** + * Creates a new TimeSeriesFilter instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance + */ + TimeSeriesFilter.create = function create(properties) { + return new TimeSeriesFilter(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * 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()); - }; + /** + * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a TimeSeriesFilter message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; + } + } + return null; + }; - /** - * 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); - }; + /** + * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter + */ + TimeSeriesFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + } + return message; + }; - return EnumOptions; - })(); + /** + * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + object.secondaryAggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } + return object; + }; - protobuf.EnumValueOptions = (function() { + /** + * Converts this TimeSeriesFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + return TimeSeriesFilter; + })(); - /** - * 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]]; - } + v1.TimeSeriesFilterRatio = (function() { - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + /** + * Properties of a TimeSeriesFilterRatio. + * @memberof google.monitoring.dashboard.v1 + * @interface ITimeSeriesFilterRatio + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator + * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator + * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation + * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter + * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter + */ - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Constructs a new TimeSeriesFilterRatio. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TimeSeriesFilterRatio. + * @implements ITimeSeriesFilterRatio + * @constructor + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + */ + function TimeSeriesFilterRatio(properties) { + if (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 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); - }; + /** + * TimeSeriesFilterRatio numerator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.numerator = null; - /** - * 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; - }; + /** + * TimeSeriesFilterRatio denominator. + * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.denominator = null; - /** - * 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(); - }; + /** + * TimeSeriesFilterRatio secondaryAggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.secondaryAggregation = null; - /** - * 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; - }; + /** + * TimeSeriesFilterRatio pickTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; - /** - * 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()); - }; + /** + * TimeSeriesFilterRatio statisticalTimeSeriesFilter. + * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; - /** - * 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; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * 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; - }; + /** + * TimeSeriesFilterRatio outputFilter. + * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + */ + Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { + get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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; - }; + /** + * Creates a new TimeSeriesFilterRatio instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance + */ + TimeSeriesFilterRatio.create = function create(properties) { + return new TimeSeriesFilterRatio(properties); + }; + + /** + * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilterRatio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) + $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) + $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * 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); - }; + /** + * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return EnumValueOptions; - })(); + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilterRatio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 2: + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + case 3: + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + case 4: + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + case 5: + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - protobuf.ServiceOptions = (function() { + /** + * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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 - */ + /** + * Verifies a TimeSeriesFilterRatio message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesFilterRatio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.numerator != null && message.hasOwnProperty("numerator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); + if (error) + return "numerator." + error; + } + if (message.denominator != null && message.hasOwnProperty("denominator")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); + if (error) + return "denominator." + error; + } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); + if (error) + return "pickTimeSeriesFilter." + error; + } + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + if (properties.outputFilter === 1) + return "outputFilter: multiple values"; + properties.outputFilter = 1; + { + var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); + if (error) + return "statisticalTimeSeriesFilter." + error; + } + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio + */ + TimeSeriesFilterRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); + if (object.numerator != null) { + if (typeof object.numerator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); + } + if (object.denominator != null) { + if (typeof object.denominator !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); + } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); + } + if (object.pickTimeSeriesFilter != null) { + if (typeof object.pickTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); + } + if (object.statisticalTimeSeriesFilter != null) { + if (typeof object.statisticalTimeSeriesFilter !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); + } + return message; + }; - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + /** + * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesFilterRatio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numerator = null; + object.denominator = null; + object.secondaryAggregation = null; + } + if (message.numerator != null && message.hasOwnProperty("numerator")) + object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); + if (message.denominator != null && message.hasOwnProperty("denominator")) + object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); + if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { + object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "pickTimeSeriesFilter"; + } + if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { + object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); + if (options.oneofs) + object.outputFilter = "statisticalTimeSeriesFilter"; + } + return object; + }; + + /** + * Converts this TimeSeriesFilterRatio to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + TimeSeriesFilterRatio.RatioPart = (function() { - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * Properties of a RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @interface IRatioPart + * @property {string|null} [filter] RatioPart filter + * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation + */ - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * Constructs a new RatioPart. + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @classdesc Represents a RatioPart. + * @implements IRatioPart + * @constructor + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + */ + function RatioPart(properties) { + if (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 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); - }; + /** + * RatioPart filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.filter = ""; - /** - * 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; - }; + /** + * RatioPart aggregation. + * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + */ + RatioPart.prototype.aggregation = null; - /** - * 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(); - }; + /** + * Creates a new RatioPart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance + */ + RatioPart.create = function create(properties) { + return new RatioPart(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) + $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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()); - }; + /** + * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RatioPart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a RatioPart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a RatioPart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RatioPart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a RatioPart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RatioPart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart + */ + RatioPart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); + } + return message; + }; - return ServiceOptions; - })(); + /** + * Creates a plain object from a RatioPart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RatioPart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.aggregation = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); + return object; + }; - protobuf.MethodOptions = (function() { + /** + * Converts this RatioPart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @instance + * @returns {Object.} JSON object + */ + RatioPart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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 - */ + return RatioPart; + })(); - /** - * 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]]; - } + return TimeSeriesFilterRatio; + })(); - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; + v1.Threshold = (function() { - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; + /** + * Properties of a Threshold. + * @memberof google.monitoring.dashboard.v1 + * @interface IThreshold + * @property {string|null} [label] Threshold label + * @property {number|null} [value] Threshold value + * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color + * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + */ - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Constructs a new Threshold. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Threshold. + * @implements IThreshold + * @constructor + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + */ + function Threshold(properties) { + if (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 .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; + /** + * Threshold label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.label = ""; - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + /** + * Threshold value. + * @member {number} value + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.value = 0; - /** - * 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); - }; + /** + * Threshold color. + * @member {google.monitoring.dashboard.v1.Threshold.Color} color + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.color = 0; - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; + /** + * Threshold direction. + * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.direction = 0; - /** - * 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(); - }; + /** + * Creates a new Threshold instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance + */ + Threshold.create = function create(properties) { + return new Threshold(properties); + }; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Threshold.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); + if (message.color != null && Object.hasOwnProperty.call(message, "color")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + return writer; + }; - /** - * 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()); - }; + /** + * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Threshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; + /** + * Decodes a Threshold message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Threshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.label = reader.string(); + break; + case 2: + message.value = reader.double(); + break; + case 3: + message.color = reader.int32(); + break; + case 4: + message.direction = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; + /** + * Decodes a Threshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Threshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; + /** + * Verifies a Threshold message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Threshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.color != null && message.hasOwnProperty("color")) + switch (message.color) { + default: + return "color: enum value expected"; + case 0: + case 4: + case 6: + break; + } + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * 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); - }; + /** + * Creates a Threshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Threshold} Threshold + */ + Threshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) + return object; + var message = new $root.google.monitoring.dashboard.v1.Threshold(); + if (object.label != null) + message.label = String(object.label); + if (object.value != null) + message.value = Number(object.value); + switch (object.color) { + case "COLOR_UNSPECIFIED": + case 0: + message.color = 0; + break; + case "YELLOW": + case 4: + message.color = 4; + break; + case "RED": + case 6: + message.color = 6; + break; + } + switch (object.direction) { + case "DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "ABOVE": + case 1: + message.direction = 1; + break; + case "BELOW": + case 2: + message.direction = 2; + break; + } + return message; + }; - /** - * 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; - })(); + /** + * Creates a plain object from a Threshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {google.monitoring.dashboard.v1.Threshold} message Threshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Threshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.value = 0; + object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; + object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.color != null && message.hasOwnProperty("color")) + object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + return object; + }; - return MethodOptions; - })(); + /** + * Converts this Threshold to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + * @returns {Object.} JSON object + */ + Threshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.UninterpretedOption = (function() { + /** + * Color enum. + * @name google.monitoring.dashboard.v1.Threshold.Color + * @enum {number} + * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value + * @property {number} YELLOW=4 YELLOW value + * @property {number} RED=6 RED value + */ + Threshold.Color = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; + values[valuesById[4] = "YELLOW"] = 4; + values[valuesById[6] = "RED"] = 6; + return values; + })(); - /** - * 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 - */ + /** + * Direction enum. + * @name google.monitoring.dashboard.v1.Threshold.Direction + * @enum {number} + * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value + * @property {number} ABOVE=1 ABOVE value + * @property {number} BELOW=2 BELOW value + */ + Threshold.Direction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ABOVE"] = 1; + values[valuesById[2] = "BELOW"] = 2; + return values; + })(); - /** - * 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]]; - } + return Threshold; + })(); - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * SparkChartType enum. + * @name google.monitoring.dashboard.v1.SparkChartType + * @enum {number} + * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value + * @property {number} SPARK_LINE=1 SPARK_LINE value + * @property {number} SPARK_BAR=2 SPARK_BAR value + */ + v1.SparkChartType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_LINE"] = 1; + values[valuesById[2] = "SPARK_BAR"] = 2; + return values; + })(); - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + v1.Text = (function() { - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Properties of a Text. + * @memberof google.monitoring.dashboard.v1 + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + */ - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new Text. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (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 doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.content = ""; - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + /** + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.format = 0; - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; - /** - * 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 Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.format = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a Text message. + * @function verify + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * 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; - }; + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.Text) + return object; + var message = new $root.google.monitoring.dashboard.v1.Text(); + if (object.content != null) + message.content = String(object.content); + switch (object.format) { + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "MARKDOWN": + case 1: + message.format = 1; + break; + case "RAW": + case 2: + message.format = 2; + 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()); - }; + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; + return object; + }; - /** - * 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; - }; + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Format enum. + * @name google.monitoring.dashboard.v1.Text.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} MARKDOWN=1 MARKDOWN value + * @property {number} RAW=2 RAW value + */ + Text.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "MARKDOWN"] = 1; + values[valuesById[2] = "RAW"] = 2; + return values; + })(); - /** - * 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; - }; + return Text; + })(); - /** - * 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); + v1.XyChart = (function() { + + /** + * Properties of a XyChart. + * @memberof google.monitoring.dashboard.v1 + * @interface IXyChart + * @property {Array.|null} [dataSets] XyChart dataSets + * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration + * @property {Array.|null} [thresholds] XyChart thresholds + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions + */ + + /** + * Constructs a new XyChart. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a XyChart. + * @implements IXyChart + * @constructor + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + */ + function XyChart(properties) { + this.dataSets = []; + this.thresholds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - 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); - }; + /** + * XyChart dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.dataSets = $util.emptyArray; - UninterpretedOption.NamePart = (function() { + /** + * XyChart timeshiftDuration. + * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.timeshiftDuration = null; - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + /** + * XyChart thresholds. + * @member {Array.} thresholds + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.thresholds = $util.emptyArray; - /** - * 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]]; - } + /** + * XyChart xAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.xAxis = null; - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * XyChart yAxis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.yAxis = null; + + /** + * XyChart chartOptions. + * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.chartOptions = null; + + /** + * Creates a new XyChart instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance + */ + XyChart.create = function create(properties) { + return new XyChart(properties); + }; + + /** + * Encodes the specified XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + XyChart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeshiftDuration != null && Object.hasOwnProperty.call(message, "timeshiftDuration")) + $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.thresholds != null && message.thresholds.length) + for (var i = 0; i < message.thresholds.length; ++i) + $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.xAxis != null && Object.hasOwnProperty.call(message, "xAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yAxis != null && Object.hasOwnProperty.call(message, "yAxis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) + $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * Encodes the specified XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + XyChart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a XyChart message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + XyChart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); + break; + case 4: + message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + case 6: + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 7: + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + case 8: + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a XyChart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + XyChart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a XyChart message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + XyChart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); + if (error) + return "dataSets." + error; + } + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { + var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); + if (error) + return "timeshiftDuration." + error; + } + if (message.thresholds != null && message.hasOwnProperty("thresholds")) { + if (!Array.isArray(message.thresholds)) + return "thresholds: array expected"; + for (var i = 0; i < message.thresholds.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); + if (error) + return "thresholds." + error; + } + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); + if (error) + return "xAxis." + error; + } + if (message.yAxis != null && message.hasOwnProperty("yAxis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); + if (error) + return "yAxis." + error; + } + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { + var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); + if (error) + return "chartOptions." + error; + } + return null; + }; - /** - * 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; + /** + * Creates a XyChart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart} XyChart + */ + XyChart.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); + } + } + if (object.timeshiftDuration != null) { + if (typeof object.timeshiftDuration !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); + message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); + } + if (object.thresholds) { + if (!Array.isArray(object.thresholds)) + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); + message.thresholds = []; + for (var i = 0; i < object.thresholds.length; ++i) { + if (typeof object.thresholds[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); + message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); + } } - } - 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; - }; + if (object.xAxis != null) { + if (typeof object.xAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); + } + if (object.yAxis != null) { + if (typeof object.yAxis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); + } + if (object.chartOptions != null) { + if (typeof object.chartOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); + } + 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()); - }; + /** + * Creates a plain object from a XyChart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {google.monitoring.dashboard.v1.XyChart} message XyChart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + XyChart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSets = []; + object.thresholds = []; + } + if (options.defaults) { + object.timeshiftDuration = null; + object.xAxis = null; + object.yAxis = null; + object.chartOptions = null; + } + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); + } + if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) + object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); + if (message.thresholds && message.thresholds.length) { + object.thresholds = []; + for (var j = 0; j < message.thresholds.length; ++j) + object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); + } + if (message.xAxis != null && message.hasOwnProperty("xAxis")) + object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); + if (message.yAxis != null && message.hasOwnProperty("yAxis")) + object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); + if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) + object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + return object; + }; - /** - * 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; - }; + /** + * Converts this XyChart to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + * @returns {Object.} JSON object + */ + XyChart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + XyChart.DataSet = (function() { - /** - * 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; - }; + /** + * Properties of a DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType + * @property {string|null} [legendTemplate] DataSet legendTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod + */ - /** - * 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); - }; + /** + * Constructs a new DataSet. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents a DataSet. + * @implements IDataSet + * @constructor + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + */ + function DataSet(properties) { + if (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 NamePart; - })(); + /** + * DataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.timeSeriesQuery = null; - return UninterpretedOption; - })(); + /** + * DataSet plotType. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.plotType = 0; - protobuf.SourceCodeInfo = (function() { + /** + * DataSet legendTemplate. + * @member {string} legendTemplate + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.legendTemplate = ""; - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ + /** + * DataSet minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.minAlignmentPeriod = null; - /** - * 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]]; - } + /** + * Creates a new DataSet instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance + */ + DataSet.create = function create(properties) { + return new DataSet(properties); + }; - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; + /** + * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.plotType != null && Object.hasOwnProperty.call(message, "plotType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); + if (message.legendTemplate != null && Object.hasOwnProperty.call(message, "legendTemplate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * 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 DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a DataSet message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 2: + message.plotType = reader.int32(); + break; + case 3: + message.legendTemplate = reader.string(); + break; + case 4: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 DataSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a DataSet message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.plotType != null && message.hasOwnProperty("plotType")) + switch (message.plotType) { + default: + return "plotType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + if (!$util.isString(message.legendTemplate)) + return "legendTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + return null; + }; - /** - * 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()); - }; + /** + * Creates a DataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet + */ + DataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + switch (object.plotType) { + case "PLOT_TYPE_UNSPECIFIED": + case 0: + message.plotType = 0; + break; + case "LINE": + case 1: + message.plotType = 1; + break; + case "STACKED_AREA": + case 2: + message.plotType = 2; + break; + case "STACKED_BAR": + case 3: + message.plotType = 3; + break; + case "HEATMAP": + case 4: + message.plotType = 4; + break; + } + if (object.legendTemplate != null) + message.legendTemplate = String(object.legendTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + return message; + }; - /** - * 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 plain object from a DataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; + object.legendTemplate = ""; + object.minAlignmentPeriod = null; + } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.plotType != null && message.hasOwnProperty("plotType")) + object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; + if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) + object.legendTemplate = message.legendTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + return object; + }; - /** - * 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; - }; + /** + * Converts this DataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + * @returns {Object.} JSON object + */ + DataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + /** + * PlotType enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType + * @enum {number} + * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value + * @property {number} LINE=1 LINE value + * @property {number} STACKED_AREA=2 STACKED_AREA value + * @property {number} STACKED_BAR=3 STACKED_BAR value + * @property {number} HEATMAP=4 HEATMAP value + */ + DataSet.PlotType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE"] = 1; + values[valuesById[2] = "STACKED_AREA"] = 2; + values[valuesById[3] = "STACKED_BAR"] = 3; + values[valuesById[4] = "HEATMAP"] = 4; + return values; + })(); - /** - * 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); - }; + return DataSet; + })(); - SourceCodeInfo.Location = (function() { + XyChart.Axis = (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 - */ + /** + * Properties of an Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @interface IAxis + * @property {string|null} [label] Axis label + * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale + */ - /** - * 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]]; - } + /** + * Constructs a new Axis. + * @memberof google.monitoring.dashboard.v1.XyChart + * @classdesc Represents an Axis. + * @implements IAxis + * @constructor + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + */ + function Axis(properties) { + if (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; + /** + * Axis label. + * @member {string} label + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.label = ""; - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * Axis scale. + * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + */ + Axis.prototype.scale = 0; - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Creates a new Axis instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance + */ + Axis.create = function create(properties) { + return new Axis(properties); + }; - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); + return writer; + }; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Axis.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes an Axis message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.label = reader.string(); + break; + case 2: + message.scale = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes an Axis message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Axis.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies an Axis message. + * @function verify + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Axis.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + switch (message.scale) { + default: + return "scale: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * 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; - }; + /** + * Creates an Axis message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis + */ + Axis.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) + return object; + var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); + if (object.label != null) + message.label = String(object.label); + switch (object.scale) { + case "SCALE_UNSPECIFIED": + case 0: + message.scale = 0; + break; + case "LINEAR": + case 1: + message.scale = 1; + break; + case "LOG10": + case 2: + message.scale = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Axis message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Axis.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.label = ""; + object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; + } + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; + return object; + }; - /** - * 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()); - }; + /** + * Converts this Axis to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @instance + * @returns {Object.} JSON object + */ + Axis.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + /** + * Scale enum. + * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale + * @enum {number} + * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value + * @property {number} LINEAR=1 LINEAR value + * @property {number} LOG10=2 LOG10 value + */ + Axis.Scale = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINEAR"] = 1; + values[valuesById[2] = "LOG10"] = 2; + return values; + })(); - /** - * 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; - }; + return Axis; + })(); - /** - * 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 XyChart; + })(); + + v1.ChartOptions = (function() { + + /** + * Properties of a ChartOptions. + * @memberof google.monitoring.dashboard.v1 + * @interface IChartOptions + * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode + */ + + /** + * Constructs a new ChartOptions. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ChartOptions. + * @implements IChartOptions + * @constructor + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + */ + function ChartOptions(properties) { + if (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 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); - }; + /** + * ChartOptions mode. + * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @instance + */ + ChartOptions.prototype.mode = 0; - return Location; - })(); + /** + * Creates a new ChartOptions instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance + */ + ChartOptions.create = function create(properties) { + return new ChartOptions(properties); + }; - return SourceCodeInfo; - })(); + /** + * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; - protobuf.GeneratedCodeInfo = (function() { + /** + * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChartOptions message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ + /** + * Decodes a ChartOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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]]; - } + /** + * Verifies a ChartOptions message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + /** + * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions + */ + ChartOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) + return object; + var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); + switch (object.mode) { + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "COLOR": + case 1: + message.mode = 1; + break; + case "X_RAY": + case 2: + message.mode = 2; + break; + case "STATS": + case 3: + message.mode = 3; + break; + } + return message; + }; - /** - * 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); - }; + /** + * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChartOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; + return object; + }; - /** - * 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; - }; + /** + * Converts this ChartOptions to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @instance + * @returns {Object.} JSON object + */ + ChartOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + /** + * Mode enum. + * @name google.monitoring.dashboard.v1.ChartOptions.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} COLOR=1 COLOR value + * @property {number} X_RAY=2 X_RAY value + * @property {number} STATS=3 STATS value + */ + ChartOptions.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COLOR"] = 1; + values[valuesById[2] = "X_RAY"] = 2; + values[valuesById[3] = "STATS"] = 3; + return values; + })(); - /** - * 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; - }; + return ChartOptions; + })(); - /** - * 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()); - }; + v1.DashboardsService = (function() { - /** - * 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; + /** + * Constructs a new DashboardsService service. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DashboardsService + * @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 DashboardsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - } - 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; - }; + (DashboardsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DashboardsService; - /** - * 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; - }; + /** + * Creates new DashboardsService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @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 {DashboardsService} RPC service. Useful where requests and/or responses are streamed. + */ + DashboardsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * 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); - }; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef CreateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ - GeneratedCodeInfo.Annotation = (function() { + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.createDashboard = function createDashboard(request, callback) { + return this.rpcCall(createDashboard, $root.google.monitoring.dashboard.v1.CreateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "CreateDashboard" }); - /** - * 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 - */ + /** + * Calls CreateDashboard. + * @function createDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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]]; - } + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef ListDashboardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} [response] ListDashboardsResponse + */ - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback} callback Node-style callback called with the error, if any, and ListDashboardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.listDashboards = function listDashboards(request, callback) { + return this.rpcCall(listDashboards, $root.google.monitoring.dashboard.v1.ListDashboardsRequest, $root.google.monitoring.dashboard.v1.ListDashboardsResponse, request, callback); + }, "name", { value: "ListDashboards" }); - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + /** + * Calls ListDashboards. + * @function listDashboards + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef GetDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.getDashboard = function getDashboard(request, callback) { + return this.rpcCall(getDashboard, $root.google.monitoring.dashboard.v1.GetDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "GetDashboard" }); + + /** + * Calls GetDashboard. + * @function getDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef DeleteDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * 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); - }; + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.deleteDashboard = function deleteDashboard(request, callback) { + return this.rpcCall(deleteDashboard, $root.google.monitoring.dashboard.v1.DeleteDashboardRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDashboard" }); - /** - * 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; - }; + /** + * Calls DeleteDashboard. + * @function deleteDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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(); - }; + /** + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @typedef UpdateDashboardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard + */ - /** - * 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; - }; + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @param {google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DashboardsService.prototype.updateDashboard = function updateDashboard(request, callback) { + return this.rpcCall(updateDashboard, $root.google.monitoring.dashboard.v1.UpdateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); + }, "name", { value: "UpdateDashboard" }); - /** - * 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()); - }; + /** + * Calls UpdateDashboard. + * @function updateDashboard + * @memberof google.monitoring.dashboard.v1.DashboardsService + * @instance + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + return DashboardsService; + })(); - /** - * 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; - }; + v1.CreateDashboardRequest = (function() { - /** - * 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]; + /** + * Properties of a CreateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface ICreateDashboardRequest + * @property {string|null} [parent] CreateDashboardRequest parent + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] CreateDashboardRequest dashboard + * @property {boolean|null} [validateOnly] CreateDashboardRequest validateOnly + */ + + /** + * Constructs a new CreateDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a CreateDashboardRequest. + * @implements ICreateDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set + */ + function CreateDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - 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); - }; + /** + * CreateDashboardRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + */ + CreateDashboardRequest.prototype.parent = ""; - return Annotation; - })(); + /** + * CreateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + */ + CreateDashboardRequest.prototype.dashboard = null; - return GeneratedCodeInfo; - })(); + /** + * CreateDashboardRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + */ + CreateDashboardRequest.prototype.validateOnly = false; - protobuf.Empty = (function() { + /** + * Creates a new CreateDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest instance + */ + CreateDashboardRequest.create = function create(properties) { + return new CreateDashboardRequest(properties); + }; - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, 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; + }; - /** - * 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]]; - } + /** + * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDashboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest + */ + CreateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.CreateDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.CreateDashboardRequest} message CreateDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDashboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dashboard = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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(); - }; + return CreateDashboardRequest; + })(); - /** - * 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; + v1.ListDashboardsRequest = (function() { + + /** + * Properties of a ListDashboardsRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IListDashboardsRequest + * @property {string|null} [parent] ListDashboardsRequest parent + * @property {number|null} [pageSize] ListDashboardsRequest pageSize + * @property {string|null} [pageToken] ListDashboardsRequest pageToken + */ + + /** + * Constructs a new ListDashboardsRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ListDashboardsRequest. + * @implements IListDashboardsRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set + */ + function ListDashboardsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes 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()); - }; + /** + * ListDashboardsRequest parent. + * @member {string} parent + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.parent = ""; - /** - * 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; - }; + /** + * ListDashboardsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.pageSize = 0; - /** - * 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(); - }; + /** + * ListDashboardsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + */ + ListDashboardsRequest.prototype.pageToken = ""; - /** - * 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 {}; - }; + /** + * Creates a new ListDashboardsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest instance + */ + ListDashboardsRequest.create = function create(properties) { + return new ListDashboardsRequest(properties); + }; - /** - * 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); - }; + /** + * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; - return Empty; - })(); + /** + * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.FieldMask = (function() { + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDashboardsRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDashboardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + /** + * Creates a ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest + */ + ListDashboardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * 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]]; - } + /** + * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {google.monitoring.dashboard.v1.ListDashboardsRequest} message ListDashboardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDashboardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; + /** + * Converts this ListDashboardsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDashboardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return ListDashboardsRequest; + })(); - /** - * 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; - }; + v1.ListDashboardsResponse = (function() { - /** - * 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(); - }; + /** + * Properties of a ListDashboardsResponse. + * @memberof google.monitoring.dashboard.v1 + * @interface IListDashboardsResponse + * @property {Array.|null} [dashboards] ListDashboardsResponse dashboards + * @property {string|null} [nextPageToken] ListDashboardsResponse nextPageToken + */ - /** - * 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; + /** + * Constructs a new ListDashboardsResponse. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a ListDashboardsResponse. + * @implements IListDashboardsResponse + * @constructor + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + */ + function ListDashboardsResponse(properties) { + this.dashboards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes a 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; - }; + /** + * ListDashboardsResponse dashboards. + * @member {Array.} dashboards + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + */ + ListDashboardsResponse.prototype.dashboards = $util.emptyArray; - /** - * 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; - }; + /** + * ListDashboardsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + */ + ListDashboardsResponse.prototype.nextPageToken = ""; - /** - * 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; - }; + /** + * Creates a new ListDashboardsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse instance + */ + ListDashboardsResponse.create = function create(properties) { + return new ListDashboardsResponse(properties); + }; - /** - * 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); - }; + /** + * Encodes the specified ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dashboards != null && message.dashboards.length) + for (var i = 0; i < message.dashboards.length; ++i) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[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; + }; - return FieldMask; - })(); + /** + * Encodes the specified ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDashboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return protobuf; - })(); + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dashboards && message.dashboards.length)) + message.dashboards = []; + message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - google.monitoring = (function() { + /** + * Decodes a ListDashboardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDashboardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Namespace monitoring. - * @memberof google - * @namespace - */ - var monitoring = {}; + /** + * Verifies a ListDashboardsResponse message. + * @function verify + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDashboardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dashboards != null && message.hasOwnProperty("dashboards")) { + if (!Array.isArray(message.dashboards)) + return "dashboards: array expected"; + for (var i = 0; i < message.dashboards.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboards[i]); + if (error) + return "dashboards." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - monitoring.dashboard = (function() { + /** + * Creates a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse + */ + ListDashboardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsResponse) + return object; + var message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); + if (object.dashboards) { + if (!Array.isArray(object.dashboards)) + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: array expected"); + message.dashboards = []; + for (var i = 0; i < object.dashboards.length; ++i) { + if (typeof object.dashboards[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: object expected"); + message.dashboards[i] = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboards[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Namespace dashboard. - * @memberof google.monitoring - * @namespace - */ - var dashboard = {}; + /** + * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} message ListDashboardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDashboardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dashboards = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dashboards && message.dashboards.length) { + object.dashboards = []; + for (var j = 0; j < message.dashboards.length; ++j) + object.dashboards[j] = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboards[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - dashboard.v1 = (function() { + /** + * Converts this ListDashboardsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDashboardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Namespace v1. - * @memberof google.monitoring.dashboard - * @namespace - */ - var v1 = {}; + return ListDashboardsResponse; + })(); - v1.Aggregation = (function() { + v1.GetDashboardRequest = (function() { /** - * Properties of an Aggregation. + * Properties of a GetDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @interface IAggregation - * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod - * @property {google.monitoring.dashboard.v1.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner - * @property {google.monitoring.dashboard.v1.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer - * @property {Array.|null} [groupByFields] Aggregation groupByFields + * @interface IGetDashboardRequest + * @property {string|null} [name] GetDashboardRequest name */ /** - * Constructs a new Aggregation. + * Constructs a new GetDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents an Aggregation. - * @implements IAggregation + * @classdesc Represents a GetDashboardRequest. + * @implements IGetDashboardRequest * @constructor - * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set */ - function Aggregation(properties) { - this.groupByFields = []; + function GetDashboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9817,117 +8333,75 @@ } /** - * Aggregation alignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod - * @memberof google.monitoring.dashboard.v1.Aggregation - * @instance - */ - Aggregation.prototype.alignmentPeriod = null; - - /** - * Aggregation perSeriesAligner. - * @member {google.monitoring.dashboard.v1.Aggregation.Aligner} perSeriesAligner - * @memberof google.monitoring.dashboard.v1.Aggregation - * @instance - */ - Aggregation.prototype.perSeriesAligner = 0; - - /** - * Aggregation crossSeriesReducer. - * @member {google.monitoring.dashboard.v1.Aggregation.Reducer} crossSeriesReducer - * @memberof google.monitoring.dashboard.v1.Aggregation - * @instance - */ - Aggregation.prototype.crossSeriesReducer = 0; - - /** - * Aggregation groupByFields. - * @member {Array.} groupByFields - * @memberof google.monitoring.dashboard.v1.Aggregation + * GetDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest * @instance */ - Aggregation.prototype.groupByFields = $util.emptyArray; + GetDashboardRequest.prototype.name = ""; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new GetDashboardRequest instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IAggregation=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation instance + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest instance */ - Aggregation.create = function create(properties) { - return new Aggregation(properties); + GetDashboardRequest.create = function create(properties) { + return new GetDashboardRequest(properties); }; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encode = function encode(message, writer) { + GetDashboardRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) - $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); - if (message.groupByFields != null && message.groupByFields.length) - for (var i = 0; i < message.groupByFields.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Aggregation.verify|verify} messages. + * Encodes the specified GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + GetDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a GetDashboardRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decode = function decode(reader, length) { + GetDashboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Aggregation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 2: - message.perSeriesAligner = reader.int32(); - break; - case 4: - message.crossSeriesReducer = reader.int32(); - break; - case 5: - if (!(message.groupByFields && message.groupByFields.length)) - message.groupByFields = []; - message.groupByFields.push(reader.string()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -9938,409 +8412,295 @@ }; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Aggregation + * Decodes a GetDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDashboardRequest.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 GetDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest + */ + GetDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GetDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.GetDashboardRequest} message GetDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDashboardRequest.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 GetDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @instance + * @returns {Object.} JSON object + */ + GetDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetDashboardRequest; + })(); + + v1.DeleteDashboardRequest = (function() { + + /** + * Properties of a DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @interface IDeleteDashboardRequest + * @property {string|null} [name] DeleteDashboardRequest name + */ + + /** + * Constructs a new DeleteDashboardRequest. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a DeleteDashboardRequest. + * @implements IDeleteDashboardRequest + * @constructor + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + */ + function DeleteDashboardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDashboardRequest name. + * @member {string} name + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @instance + */ + DeleteDashboardRequest.prototype.name = ""; + + /** + * Creates a new DeleteDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest instance + */ + DeleteDashboardRequest.create = function create(properties) { + return new DeleteDashboardRequest(properties); + }; + + /** + * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.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 DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decodeDelimited = function decodeDelimited(reader) { + DeleteDashboardRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Aggregation message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Aggregation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aggregation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); - if (error) - return "alignmentPeriod." + error; - } - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - switch (message.perSeriesAligner) { - default: - return "perSeriesAligner: enum value expected"; - case 0: + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - case 2: - case 3: - case 4: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 24: - case 17: - case 18: - case 19: - case 20: - case 21: - case 23: + message.name = reader.string(); break; - } - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - switch (message.crossSeriesReducer) { default: - return "crossSeriesReducer: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 15: - case 8: - case 9: - case 10: - case 11: - case 12: + reader.skipType(tag & 7); break; } - if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { - if (!Array.isArray(message.groupByFields)) - return "groupByFields: array expected"; - for (var i = 0; i < message.groupByFields.length; ++i) - if (!$util.isString(message.groupByFields[i])) - return "groupByFields: string[] expected"; } - return null; + return message; }; /** - * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Aggregation + * Decodes a DeleteDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Aggregation} Aggregation + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Aggregation) - return object; - var message = new $root.google.monitoring.dashboard.v1.Aggregation(); - if (object.alignmentPeriod != null) { - if (typeof object.alignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Aggregation.alignmentPeriod: object expected"); - message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); - } - switch (object.perSeriesAligner) { - case "ALIGN_NONE": - case 0: - message.perSeriesAligner = 0; - break; - case "ALIGN_DELTA": - case 1: - message.perSeriesAligner = 1; - break; - case "ALIGN_RATE": - case 2: - message.perSeriesAligner = 2; - break; - case "ALIGN_INTERPOLATE": - case 3: - message.perSeriesAligner = 3; - break; - case "ALIGN_NEXT_OLDER": - case 4: - message.perSeriesAligner = 4; - break; - case "ALIGN_MIN": - case 10: - message.perSeriesAligner = 10; - break; - case "ALIGN_MAX": - case 11: - message.perSeriesAligner = 11; - break; - case "ALIGN_MEAN": - case 12: - message.perSeriesAligner = 12; - break; - case "ALIGN_COUNT": - case 13: - message.perSeriesAligner = 13; - break; - case "ALIGN_SUM": - case 14: - message.perSeriesAligner = 14; - break; - case "ALIGN_STDDEV": - case 15: - message.perSeriesAligner = 15; - break; - case "ALIGN_COUNT_TRUE": - case 16: - message.perSeriesAligner = 16; - break; - case "ALIGN_COUNT_FALSE": - case 24: - message.perSeriesAligner = 24; - break; - case "ALIGN_FRACTION_TRUE": - case 17: - message.perSeriesAligner = 17; - break; - case "ALIGN_PERCENTILE_99": - case 18: - message.perSeriesAligner = 18; - break; - case "ALIGN_PERCENTILE_95": - case 19: - message.perSeriesAligner = 19; - break; - case "ALIGN_PERCENTILE_50": - case 20: - message.perSeriesAligner = 20; - break; - case "ALIGN_PERCENTILE_05": - case 21: - message.perSeriesAligner = 21; - break; - case "ALIGN_PERCENT_CHANGE": - case 23: - message.perSeriesAligner = 23; - break; - } - switch (object.crossSeriesReducer) { - case "REDUCE_NONE": - case 0: - message.crossSeriesReducer = 0; - break; - case "REDUCE_MEAN": - case 1: - message.crossSeriesReducer = 1; - break; - case "REDUCE_MIN": - case 2: - message.crossSeriesReducer = 2; - break; - case "REDUCE_MAX": - case 3: - message.crossSeriesReducer = 3; - break; - case "REDUCE_SUM": - case 4: - message.crossSeriesReducer = 4; - break; - case "REDUCE_STDDEV": - case 5: - message.crossSeriesReducer = 5; - break; - case "REDUCE_COUNT": - case 6: - message.crossSeriesReducer = 6; - break; - case "REDUCE_COUNT_TRUE": - case 7: - message.crossSeriesReducer = 7; - break; - case "REDUCE_COUNT_FALSE": - case 15: - message.crossSeriesReducer = 15; - break; - case "REDUCE_FRACTION_TRUE": - case 8: - message.crossSeriesReducer = 8; - break; - case "REDUCE_PERCENTILE_99": - case 9: - message.crossSeriesReducer = 9; - break; - case "REDUCE_PERCENTILE_95": - case 10: - message.crossSeriesReducer = 10; - break; - case "REDUCE_PERCENTILE_50": - case 11: - message.crossSeriesReducer = 11; - break; - case "REDUCE_PERCENTILE_05": - case 12: - message.crossSeriesReducer = 12; - break; - } - if (object.groupByFields) { - if (!Array.isArray(object.groupByFields)) - throw TypeError(".google.monitoring.dashboard.v1.Aggregation.groupByFields: array expected"); - message.groupByFields = []; - for (var i = 0; i < object.groupByFields.length; ++i) - message.groupByFields[i] = String(object.groupByFields[i]); - } + DeleteDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDashboardRequest.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 DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest + */ + DeleteDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.DeleteDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.Aggregation} message Aggregation + * @param {google.monitoring.dashboard.v1.DeleteDashboardRequest} message DeleteDashboardRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregation.toObject = function toObject(message, options) { + DeleteDashboardRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groupByFields = []; - if (options.defaults) { - object.alignmentPeriod = null; - object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; - object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; - } - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) - object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - object.perSeriesAligner = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.dashboard.v1.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; - if (message.groupByFields && message.groupByFields.length) { - object.groupByFields = []; - for (var j = 0; j < message.groupByFields.length; ++j) - object.groupByFields[j] = message.groupByFields[j]; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Aggregation to JSON. + * Converts this DeleteDashboardRequest to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.Aggregation + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest * @instance * @returns {Object.} JSON object */ - Aggregation.prototype.toJSON = function toJSON() { + DeleteDashboardRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Aligner enum. - * @name google.monitoring.dashboard.v1.Aggregation.Aligner - * @enum {number} - * @property {number} ALIGN_NONE=0 ALIGN_NONE value - * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value - * @property {number} ALIGN_RATE=2 ALIGN_RATE value - * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value - * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value - * @property {number} ALIGN_MIN=10 ALIGN_MIN value - * @property {number} ALIGN_MAX=11 ALIGN_MAX value - * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value - * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value - * @property {number} ALIGN_SUM=14 ALIGN_SUM value - * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value - * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value - * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value - * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value - * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value - * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value - * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value - * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value - * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value - */ - Aggregation.Aligner = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ALIGN_NONE"] = 0; - values[valuesById[1] = "ALIGN_DELTA"] = 1; - values[valuesById[2] = "ALIGN_RATE"] = 2; - values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; - values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; - values[valuesById[10] = "ALIGN_MIN"] = 10; - values[valuesById[11] = "ALIGN_MAX"] = 11; - values[valuesById[12] = "ALIGN_MEAN"] = 12; - values[valuesById[13] = "ALIGN_COUNT"] = 13; - values[valuesById[14] = "ALIGN_SUM"] = 14; - values[valuesById[15] = "ALIGN_STDDEV"] = 15; - values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; - values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; - values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; - values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; - values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; - values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; - values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; - values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; - return values; - })(); - - /** - * Reducer enum. - * @name google.monitoring.dashboard.v1.Aggregation.Reducer - * @enum {number} - * @property {number} REDUCE_NONE=0 REDUCE_NONE value - * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value - * @property {number} REDUCE_MIN=2 REDUCE_MIN value - * @property {number} REDUCE_MAX=3 REDUCE_MAX value - * @property {number} REDUCE_SUM=4 REDUCE_SUM value - * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value - * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value - * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value - * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value - * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value - * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value - * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value - * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value - * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value - */ - Aggregation.Reducer = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDUCE_NONE"] = 0; - values[valuesById[1] = "REDUCE_MEAN"] = 1; - values[valuesById[2] = "REDUCE_MIN"] = 2; - values[valuesById[3] = "REDUCE_MAX"] = 3; - values[valuesById[4] = "REDUCE_SUM"] = 4; - values[valuesById[5] = "REDUCE_STDDEV"] = 5; - values[valuesById[6] = "REDUCE_COUNT"] = 6; - values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; - values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; - values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; - values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; - values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; - values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; - values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; - return values; - })(); - - return Aggregation; + return DeleteDashboardRequest; })(); - v1.PickTimeSeriesFilter = (function() { + v1.UpdateDashboardRequest = (function() { /** - * Properties of a PickTimeSeriesFilter. + * Properties of an UpdateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @interface IPickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method|null} [rankingMethod] PickTimeSeriesFilter rankingMethod - * @property {number|null} [numTimeSeries] PickTimeSeriesFilter numTimeSeries - * @property {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction|null} [direction] PickTimeSeriesFilter direction + * @interface IUpdateDashboardRequest + * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] UpdateDashboardRequest dashboard + * @property {boolean|null} [validateOnly] UpdateDashboardRequest validateOnly */ /** - * Constructs a new PickTimeSeriesFilter. + * Constructs a new UpdateDashboardRequest. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a PickTimeSeriesFilter. - * @implements IPickTimeSeriesFilter + * @classdesc Represents an UpdateDashboardRequest. + * @implements IUpdateDashboardRequest * @constructor - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set */ - function PickTimeSeriesFilter(properties) { + function UpdateDashboardRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10348,1183 +8708,1776 @@ } /** - * PickTimeSeriesFilter rankingMethod. - * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method} rankingMethod - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * UpdateDashboardRequest dashboard. + * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @instance */ - PickTimeSeriesFilter.prototype.rankingMethod = 0; + UpdateDashboardRequest.prototype.dashboard = null; + + /** + * UpdateDashboardRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @instance + */ + UpdateDashboardRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDashboardRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest instance + */ + UpdateDashboardRequest.create = function create(properties) { + return new UpdateDashboardRequest(properties); + }; + + /** + * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDashboardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) + $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).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 UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDashboardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDashboardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * PickTimeSeriesFilter numTimeSeries. - * @member {number} numTimeSeries - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance + * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PickTimeSeriesFilter.prototype.numTimeSeries = 0; + UpdateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * PickTimeSeriesFilter direction. - * @member {google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction} direction - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance + * Verifies an UpdateDashboardRequest message. + * @function verify + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PickTimeSeriesFilter.prototype.direction = 0; + UpdateDashboardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dashboard != null && message.hasOwnProperty("dashboard")) { + var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); + if (error) + return "dashboard." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Creates a new PickTimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter instance + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest */ - PickTimeSeriesFilter.create = function create(properties) { - return new PickTimeSeriesFilter(properties); + UpdateDashboardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.UpdateDashboardRequest) + return object; + var message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); + if (object.dashboard != null) { + if (typeof object.dashboard !== "object") + throw TypeError(".google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard: object expected"); + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; }; /** - * Encodes the specified PickTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {google.monitoring.dashboard.v1.UpdateDashboardRequest} message UpdateDashboardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - PickTimeSeriesFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.direction); - return writer; + UpdateDashboardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dashboard = null; + object.validateOnly = false; + } + if (message.dashboard != null && message.hasOwnProperty("dashboard")) + object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; }; /** - * Encodes the specified PickTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IPickTimeSeriesFilter} message PickTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Converts this UpdateDashboardRequest to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @instance + * @returns {Object.} JSON object */ - PickTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UpdateDashboardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PickTimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rankingMethod = reader.int32(); - break; - case 2: - message.numTimeSeries = reader.int32(); - break; - case 3: - message.direction = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return UpdateDashboardRequest; + })(); + + return v1; + })(); + + return dashboard; + })(); + + return monitoring; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; - /** - * Decodes a PickTimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PickTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a PickTimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PickTimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - switch (message.rankingMethod) { - default: - return "rankingMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - if (!$util.isInteger(message.numTimeSeries)) - return "numTimeSeries: integer expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - switch (message.direction) { - default: - return "direction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * 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; + }; - /** - * Creates a PickTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.PickTimeSeriesFilter} PickTimeSeriesFilter - */ - PickTimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter) - return object; - var message = new $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter(); - switch (object.rankingMethod) { - case "METHOD_UNSPECIFIED": + /** + * 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: - message.rankingMethod = 0; - break; - case "METHOD_MEAN": case 1: - message.rankingMethod = 1; - break; - case "METHOD_MAX": - case 2: - message.rankingMethod = 2; - break; - case "METHOD_MIN": - case 3: - message.rankingMethod = 3; - break; - case "METHOD_SUM": - case 4: - message.rankingMethod = 4; - break; - case "METHOD_LATEST": - case 5: - message.rankingMethod = 5; break; } - if (object.numTimeSeries != null) - message.numTimeSeries = object.numTimeSeries | 0; - switch (object.direction) { - case "DIRECTION_UNSPECIFIED": + } + 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.direction = 0; + message.style[i] = 0; break; - case "TOP": + case "DECLARATIVE_FRIENDLY": case 1: - message.direction = 1; - break; - case "BOTTOM": - case 2: - message.direction = 2; + message.style[i] = 1; break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a PickTimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.PickTimeSeriesFilter} message PickTimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PickTimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; - object.numTimeSeries = 0; - object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; - } - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - object.numTimeSeries = message.numTimeSeries; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction[message.direction] : message.direction; - return object; - }; + /** + * 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 PickTimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - PickTimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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]]; + } - /** - * Method enum. - * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method - * @enum {number} - * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value - * @property {number} METHOD_MEAN=1 METHOD_MEAN value - * @property {number} METHOD_MAX=2 METHOD_MAX value - * @property {number} METHOD_MIN=3 METHOD_MIN value - * @property {number} METHOD_SUM=4 METHOD_SUM value - * @property {number} METHOD_LATEST=5 METHOD_LATEST value - */ - PickTimeSeriesFilter.Method = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "METHOD_MEAN"] = 1; - values[valuesById[2] = "METHOD_MAX"] = 2; - values[valuesById[3] = "METHOD_MIN"] = 3; - values[valuesById[4] = "METHOD_SUM"] = 4; - values[valuesById[5] = "METHOD_LATEST"] = 5; - return values; - })(); + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - /** - * Direction enum. - * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Direction - * @enum {number} - * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value - * @property {number} TOP=1 TOP value - * @property {number} BOTTOM=2 BOTTOM value - */ - PickTimeSeriesFilter.Direction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TOP"] = 1; - values[valuesById[2] = "BOTTOM"] = 2; - return values; - })(); + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; - return PickTimeSeriesFilter; - })(); + /** + * 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); + }; - v1.StatisticalTimeSeriesFilter = (function() { + /** + * 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; + }; - /** - * Properties of a StatisticalTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @interface IStatisticalTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method|null} [rankingMethod] StatisticalTimeSeriesFilter rankingMethod - * @property {number|null} [numTimeSeries] StatisticalTimeSeriesFilter numTimeSeries - */ + /** + * 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(); + }; - /** - * Constructs a new StatisticalTimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a StatisticalTimeSeriesFilter. - * @implements IStatisticalTimeSeriesFilter - * @constructor - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set - */ - function StatisticalTimeSeriesFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a 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; + }; - /** - * StatisticalTimeSeriesFilter rankingMethod. - * @member {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method} rankingMethod - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - */ - StatisticalTimeSeriesFilter.prototype.rankingMethod = 0; + /** + * 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()); + }; - /** - * StatisticalTimeSeriesFilter numTimeSeries. - * @member {number} numTimeSeries - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - */ - StatisticalTimeSeriesFilter.prototype.numTimeSeries = 0; + /** + * 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 new StatisticalTimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter instance - */ - StatisticalTimeSeriesFilter.create = function create(properties) { - return new StatisticalTimeSeriesFilter(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified StatisticalTimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticalTimeSeriesFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rankingMethod != null && Object.hasOwnProperty.call(message, "rankingMethod")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankingMethod); - if (message.numTimeSeries != null && Object.hasOwnProperty.call(message, "numTimeSeries")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numTimeSeries); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified StatisticalTimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticalTimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticalTimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rankingMethod = reader.int32(); - break; - case 2: - message.numTimeSeries = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ResourceReference; + })(); - /** - * Decodes a StatisticalTimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticalTimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + api.Distribution = (function() { - /** - * Verifies a StatisticalTimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatisticalTimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - switch (message.rankingMethod) { - default: - return "rankingMethod: enum value expected"; - case 0: - case 1: - break; - } - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - if (!$util.isInteger(message.numTimeSeries)) - return "numTimeSeries: integer expected"; - return null; - }; + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ - /** - * Creates a StatisticalTimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} StatisticalTimeSeriesFilter - */ - StatisticalTimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter) - return object; - var message = new $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter(); - switch (object.rankingMethod) { - case "METHOD_UNSPECIFIED": - case 0: - message.rankingMethod = 0; - break; - case "METHOD_CLUSTER_OUTLIER": - case 1: - message.rankingMethod = 1; - break; - } - if (object.numTimeSeries != null) - message.numTimeSeries = object.numTimeSeries | 0; - return message; - }; + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a plain object from a StatisticalTimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter} message StatisticalTimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatisticalTimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rankingMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; - object.numTimeSeries = 0; - } - if (message.rankingMethod != null && message.hasOwnProperty("rankingMethod")) - object.rankingMethod = options.enums === String ? $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method[message.rankingMethod] : message.rankingMethod; - if (message.numTimeSeries != null && message.hasOwnProperty("numTimeSeries")) - object.numTimeSeries = message.numTimeSeries; - return object; - }; + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Converts this StatisticalTimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - StatisticalTimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; - /** - * Method enum. - * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method - * @enum {number} - * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value - * @property {number} METHOD_CLUSTER_OUTLIER=1 METHOD_CLUSTER_OUTLIER value - */ - StatisticalTimeSeriesFilter.Method = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; - values[valuesById[1] = "METHOD_CLUSTER_OUTLIER"] = 1; - return values; - })(); + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; - return StatisticalTimeSeriesFilter; - })(); + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; - v1.Dashboard = (function() { + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; - /** - * Properties of a Dashboard. - * @memberof google.monitoring.dashboard.v1 - * @interface IDashboard - * @property {string|null} [name] Dashboard name - * @property {string|null} [displayName] Dashboard displayName - * @property {string|null} [etag] Dashboard etag - * @property {google.monitoring.dashboard.v1.IGridLayout|null} [gridLayout] Dashboard gridLayout - * @property {google.monitoring.dashboard.v1.IMosaicLayout|null} [mosaicLayout] Dashboard mosaicLayout - * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout - * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout - */ + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; - /** - * Constructs a new Dashboard. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Dashboard. - * @implements IDashboard - * @constructor - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set - */ - function Dashboard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; - /** - * Dashboard name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.name = ""; + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; - /** - * Dashboard displayName. - * @member {string} displayName - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.displayName = ""; + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Dashboard etag. - * @member {string} etag - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.etag = ""; + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Dashboard gridLayout. - * @member {google.monitoring.dashboard.v1.IGridLayout|null|undefined} gridLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.gridLayout = null; + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function 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.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int64(); + break; + case 2: + message.mean = reader.double(); + break; + case 3: + message.sumOfSquaredDeviation = reader.double(); + break; + case 4: + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + case 6: + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + case 10: + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Dashboard mosaicLayout. - * @member {google.monitoring.dashboard.v1.IMosaicLayout|null|undefined} mosaicLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.mosaicLayout = null; + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Dashboard rowLayout. - * @member {google.monitoring.dashboard.v1.IRowLayout|null|undefined} rowLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.rowLayout = null; + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; - /** - * Dashboard columnLayout. - * @member {google.monitoring.dashboard.v1.IColumnLayout|null|undefined} columnLayout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Dashboard.prototype.columnLayout = null; + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Dashboard layout. - * @member {"gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"|undefined} layout - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - */ - Object.defineProperty(Dashboard.prototype, "layout", { - get: $util.oneOfGetter($oneOfFields = ["gridLayout", "mosaicLayout", "rowLayout", "columnLayout"]), - set: $util.oneOfSetter($oneOfFields) - }); + Distribution.Range = (function() { - /** - * Creates a new Dashboard instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard instance - */ - Dashboard.create = function create(properties) { - return new Dashboard(properties); - }; + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ - /** - * Encodes the specified Dashboard message. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dashboard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.gridLayout != null && Object.hasOwnProperty.call(message, "gridLayout")) - $root.google.monitoring.dashboard.v1.GridLayout.encode(message.gridLayout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.mosaicLayout != null && Object.hasOwnProperty.call(message, "mosaicLayout")) - $root.google.monitoring.dashboard.v1.MosaicLayout.encode(message.mosaicLayout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rowLayout != null && Object.hasOwnProperty.call(message, "rowLayout")) - $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) - $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (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 Dashboard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Dashboard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {google.monitoring.dashboard.v1.IDashboard} message Dashboard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dashboard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; - /** - * Decodes a Dashboard message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dashboard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 4: - message.etag = reader.string(); - break; - case 5: - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); - break; - case 6: - message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.decode(reader, reader.uint32()); - break; - case 8: - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); - break; - case 9: - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; - /** - * Decodes a Dashboard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dashboard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; - /** - * Verifies a Dashboard message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Dashboard.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.GridLayout.verify(message.gridLayout); - if (error) - return "gridLayout." + error; - } - } - if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.MosaicLayout.verify(message.mosaicLayout); - if (error) - return "mosaicLayout." + error; - } - } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.RowLayout.verify(message.rowLayout); - if (error) - return "rowLayout." + error; - } - } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - if (properties.layout === 1) - return "layout: multiple values"; - properties.layout = 1; - { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.verify(message.columnLayout); - if (error) - return "columnLayout." + error; - } - } - return null; - }; + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; - /** - * Creates a Dashboard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Dashboard} Dashboard - */ - Dashboard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Dashboard) - return object; - var message = new $root.google.monitoring.dashboard.v1.Dashboard(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.etag != null) - message.etag = String(object.etag); - if (object.gridLayout != null) { - if (typeof object.gridLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.gridLayout: object expected"); - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.fromObject(object.gridLayout); - } - if (object.mosaicLayout != null) { - if (typeof object.mosaicLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.mosaicLayout: object expected"); - message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.fromObject(object.mosaicLayout); - } - if (object.rowLayout != null) { - if (typeof object.rowLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.rowLayout: object expected"); - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.fromObject(object.rowLayout); - } - if (object.columnLayout != null) { - if (typeof object.columnLayout !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); - } - return message; - }; + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Dashboard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Dashboard - * @static - * @param {google.monitoring.dashboard.v1.Dashboard} message Dashboard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Dashboard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.gridLayout != null && message.hasOwnProperty("gridLayout")) { - object.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.toObject(message.gridLayout, options); - if (options.oneofs) - object.layout = "gridLayout"; - } - if (message.mosaicLayout != null && message.hasOwnProperty("mosaicLayout")) { - object.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.toObject(message.mosaicLayout, options); - if (options.oneofs) - object.layout = "mosaicLayout"; - } - if (message.rowLayout != null && message.hasOwnProperty("rowLayout")) { - object.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.toObject(message.rowLayout, options); - if (options.oneofs) - object.layout = "rowLayout"; - } - if (message.columnLayout != null && message.hasOwnProperty("columnLayout")) { - object.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.toObject(message.columnLayout, options); - if (options.oneofs) - object.layout = "columnLayout"; + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function 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.Distribution.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.min = reader.double(); + break; + case 2: + message.max = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) return object; - }; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; - /** - * Converts this Dashboard to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Dashboard - * @instance - * @returns {Object.} JSON object - */ - Dashboard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + return object; + }; - return Dashboard; - })(); + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.api.Distribution.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.GridLayout = (function() { + return Range; + })(); - /** - * Properties of a GridLayout. - * @memberof google.monitoring.dashboard.v1 - * @interface IGridLayout - * @property {number|Long|null} [columns] GridLayout columns - * @property {Array.|null} [widgets] GridLayout widgets - */ + Distribution.BucketOptions = (function() { - /** - * Constructs a new GridLayout. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GridLayout. - * @implements IGridLayout - * @constructor - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - */ - function GridLayout(properties) { - this.widgets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ - /** - * GridLayout columns. - * @member {number|Long} columns - * @memberof google.monitoring.dashboard.v1.GridLayout - * @instance - */ - GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * GridLayout widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.GridLayout - * @instance - */ - GridLayout.prototype.widgets = $util.emptyArray; + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; - /** - * Creates a new GridLayout instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance - */ - GridLayout.create = function create(properties) { - return new GridLayout(properties); - }; + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; - /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GridLayout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; - /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GridLayout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GridLayout message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GridLayout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.columns = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function 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.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + case 2: + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + case 3: + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GridLayout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GridLayout message. - * @function verify - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GridLayout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) - return "columns: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; } - return null; - }; - - /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout - */ - GridLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) - return object; - var message = new $root.google.monitoring.dashboard.v1.GridLayout(); - if (object.columns != null) - if ($util.Long) - (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; - else if (typeof object.columns === "string") - message.columns = parseInt(object.columns, 10); - else if (typeof object.columns === "number") - message.columns = object.columns; - else if (typeof object.columns === "object") - message.columns = new $util.LongBits(object.columns.low >>> 0, object.columns.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.GridLayout.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; } - return message; - }; - - /** - * Creates a plain object from a GridLayout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.GridLayout - * @static - * @param {google.monitoring.dashboard.v1.GridLayout} message GridLayout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GridLayout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.columns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.columns = options.longs === String ? "0" : 0; - if (message.columns != null && message.hasOwnProperty("columns")) - if (typeof message.columns === "number") - object.columns = options.longs === String ? String(message.columns) : message.columns; - else - object.columns = options.longs === String ? $util.Long.prototype.toString.call(message.columns) : options.longs === Number ? new $util.LongBits(message.columns.low >>> 0, message.columns.high >>> 0).toNumber() : message.columns; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; } + } + return null; + }; + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) return object; - }; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; - /** - * Converts this GridLayout to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.GridLayout - * @instance - * @returns {Object.} JSON object - */ - GridLayout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; - return GridLayout; - })(); + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.MosaicLayout = (function() { + BucketOptions.Linear = (function() { /** - * Properties of a MosaicLayout. - * @memberof google.monitoring.dashboard.v1 - * @interface IMosaicLayout - * @property {number|null} [columns] MosaicLayout columns - * @property {Array.|null} [tiles] MosaicLayout tiles + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset */ /** - * Constructs a new MosaicLayout. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a MosaicLayout. - * @implements IMosaicLayout + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear * @constructor - * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set */ - function MosaicLayout(properties) { - this.tiles = []; + function Linear(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11532,91 +10485,101 @@ } /** - * MosaicLayout columns. - * @member {number} columns - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear * @instance */ - MosaicLayout.prototype.columns = 0; + Linear.prototype.numFiniteBuckets = 0; /** - * MosaicLayout tiles. - * @member {Array.} tiles - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear * @instance */ - MosaicLayout.prototype.tiles = $util.emptyArray; + Linear.prototype.width = 0; /** - * Creates a new MosaicLayout instance using the specified properties. + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; + + /** + * Creates a new Linear instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IMosaicLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout instance + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance */ - MosaicLayout.create = function create(properties) { - return new MosaicLayout(properties); + Linear.create = function create(properties) { + return new Linear(properties); }; /** - * Encodes the specified MosaicLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MosaicLayout.encode = function encode(message, writer) { + Linear.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.columns); - if (message.tiles != null && message.tiles.length) - for (var i = 0; i < message.tiles.length; ++i) - $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.encode(message.tiles[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); return writer; }; /** - * Encodes the specified MosaicLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.verify|verify} messages. + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.IMosaicLayout} message MosaicLayout message or plain object to encode + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MosaicLayout.encodeDelimited = function encodeDelimited(message, writer) { + Linear.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MosaicLayout message from the specified reader or buffer. + * Decodes a Linear message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @returns {google.api.Distribution.BucketOptions.Linear} Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MosaicLayout.decode = function decode(reader, length) { + Linear.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columns = reader.int32(); + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.width = reader.double(); break; case 3: - if (!(message.tiles && message.tiles.length)) - message.tiles = []; - message.tiles.push($root.google.monitoring.dashboard.v1.MosaicLayout.Tile.decode(reader, reader.uint32())); + message.offset = reader.double(); break; default: reader.skipType(tag & 7); @@ -11627,415 +10590,357 @@ }; /** - * Decodes a MosaicLayout message from the specified reader or buffer, length delimited. + * Decodes a Linear message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @returns {google.api.Distribution.BucketOptions.Linear} Linear * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MosaicLayout.decodeDelimited = function decodeDelimited(reader) { + Linear.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MosaicLayout message. + * Verifies a Linear message. * @function verify - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MosaicLayout.verify = function verify(message) { + Linear.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns)) - return "columns: integer expected"; - if (message.tiles != null && message.hasOwnProperty("tiles")) { - if (!Array.isArray(message.tiles)) - return "tiles: array expected"; - for (var i = 0; i < message.tiles.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.verify(message.tiles[i]); - if (error) - return "tiles." + error; - } - } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; return null; }; /** - * Creates a MosaicLayout message from a plain object. Also converts values to their respective internal types. + * Creates a Linear message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.MosaicLayout} MosaicLayout + * @returns {google.api.Distribution.BucketOptions.Linear} Linear */ - MosaicLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout) + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) return object; - var message = new $root.google.monitoring.dashboard.v1.MosaicLayout(); - if (object.columns != null) - message.columns = object.columns | 0; - if (object.tiles) { - if (!Array.isArray(object.tiles)) - throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: array expected"); - message.tiles = []; - for (var i = 0; i < object.tiles.length; ++i) { - if (typeof object.tiles[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.tiles: object expected"); - message.tiles[i] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.fromObject(object.tiles[i]); - } - } + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); return message; }; /** - * Creates a plain object from a MosaicLayout message. Also converts values to other types if specified. + * Creates a plain object from a Linear message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @static - * @param {google.monitoring.dashboard.v1.MosaicLayout} message MosaicLayout + * @param {google.api.Distribution.BucketOptions.Linear} message Linear * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MosaicLayout.toObject = function toObject(message, options) { + Linear.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.tiles = []; - if (options.defaults) - object.columns = 0; - if (message.columns != null && message.hasOwnProperty("columns")) - object.columns = message.columns; - if (message.tiles && message.tiles.length) { - object.tiles = []; - for (var j = 0; j < message.tiles.length; ++j) - object.tiles[j] = $root.google.monitoring.dashboard.v1.MosaicLayout.Tile.toObject(message.tiles[j], options); + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; return object; }; /** - * Converts this MosaicLayout to JSON. + * Converts this Linear to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @memberof google.api.Distribution.BucketOptions.Linear * @instance * @returns {Object.} JSON object */ - MosaicLayout.prototype.toJSON = function toJSON() { + Linear.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - MosaicLayout.Tile = (function() { - - /** - * Properties of a Tile. - * @memberof google.monitoring.dashboard.v1.MosaicLayout - * @interface ITile - * @property {number|null} [xPos] Tile xPos - * @property {number|null} [yPos] Tile yPos - * @property {number|null} [width] Tile width - * @property {number|null} [height] Tile height - * @property {google.monitoring.dashboard.v1.IWidget|null} [widget] Tile widget - */ - - /** - * Constructs a new Tile. - * @memberof google.monitoring.dashboard.v1.MosaicLayout - * @classdesc Represents a Tile. - * @implements ITile - * @constructor - * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set - */ - function Tile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tile xPos. - * @member {number} xPos - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - */ - Tile.prototype.xPos = 0; + return Linear; + })(); - /** - * Tile yPos. - * @member {number} yPos - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - */ - Tile.prototype.yPos = 0; + BucketOptions.Exponential = (function() { - /** - * Tile width. - * @member {number} width - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - */ - Tile.prototype.width = 0; + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ - /** - * Tile height. - * @member {number} height - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - */ - Tile.prototype.height = 0; + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Tile widget. - * @member {google.monitoring.dashboard.v1.IWidget|null|undefined} widget - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - */ - Tile.prototype.widget = null; + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; - /** - * Creates a new Tile instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile instance - */ - Tile.create = function create(properties) { - return new Tile(properties); - }; + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; - /** - * Encodes the specified Tile message. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.xPos != null && Object.hasOwnProperty.call(message, "xPos")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.xPos); - if (message.yPos != null && Object.hasOwnProperty.call(message, "yPos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.yPos); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.width); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height); - if (message.widget != null && Object.hasOwnProperty.call(message, "widget")) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widget, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; - /** - * Encodes the specified Tile message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.MosaicLayout.Tile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {google.monitoring.dashboard.v1.MosaicLayout.ITile} message Tile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; - /** - * Decodes a Tile message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.xPos = reader.int32(); - break; - case 2: - message.yPos = reader.int32(); - break; - case 3: - message.width = reader.int32(); - break; - case 4: - message.height = reader.int32(); - break; - case 5: - message.widget = $root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; - /** - * Decodes a Tile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Tile message. - * @function verify - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.xPos != null && message.hasOwnProperty("xPos")) - if (!$util.isInteger(message.xPos)) - return "xPos: integer expected"; - if (message.yPos != null && message.hasOwnProperty("yPos")) - if (!$util.isInteger(message.yPos)) - return "yPos: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (!$util.isInteger(message.width)) - return "width: integer expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height)) - return "height: integer expected"; - if (message.widget != null && message.hasOwnProperty("widget")) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widget); - if (error) - return "widget." + error; + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function 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.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.numFiniteBuckets = reader.int32(); + break; + case 2: + message.growthFactor = reader.double(); + break; + case 3: + message.scale = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Tile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.MosaicLayout.Tile} Tile - */ - Tile.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.MosaicLayout.Tile) - return object; - var message = new $root.google.monitoring.dashboard.v1.MosaicLayout.Tile(); - if (object.xPos != null) - message.xPos = object.xPos | 0; - if (object.yPos != null) - message.yPos = object.yPos | 0; - if (object.width != null) - message.width = object.width | 0; - if (object.height != null) - message.height = object.height | 0; - if (object.widget != null) { - if (typeof object.widget !== "object") - throw TypeError(".google.monitoring.dashboard.v1.MosaicLayout.Tile.widget: object expected"); - message.widget = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widget); - } - return message; - }; + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Tile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @static - * @param {google.monitoring.dashboard.v1.MosaicLayout.Tile} message Tile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.xPos = 0; - object.yPos = 0; - object.width = 0; - object.height = 0; - object.widget = null; - } - if (message.xPos != null && message.hasOwnProperty("xPos")) - object.xPos = message.xPos; - if (message.yPos != null && message.hasOwnProperty("yPos")) - object.yPos = message.yPos; - if (message.width != null && message.hasOwnProperty("width")) - object.width = message.width; - if (message.height != null && message.hasOwnProperty("height")) - object.height = message.height; - if (message.widget != null && message.hasOwnProperty("widget")) - object.widget = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widget, options); + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) return object; - }; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; - /** - * Converts this Tile to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile - * @instance - * @returns {Object.} JSON object - */ - Tile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; - return Tile; - })(); + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MosaicLayout; + return Exponential; })(); - v1.RowLayout = (function() { + BucketOptions.Explicit = (function() { /** - * Properties of a RowLayout. - * @memberof google.monitoring.dashboard.v1 - * @interface IRowLayout - * @property {Array.|null} [rows] RowLayout rows + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds */ /** - * Constructs a new RowLayout. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a RowLayout. - * @implements IRowLayout + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit * @constructor - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set - */ - function RowLayout(properties) { - this.rows = []; + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12043,78 +10948,86 @@ } /** - * RowLayout rows. - * @member {Array.} rows - * @memberof google.monitoring.dashboard.v1.RowLayout + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit * @instance */ - RowLayout.prototype.rows = $util.emptyArray; + Explicit.prototype.bounds = $util.emptyArray; /** - * Creates a new RowLayout instance using the specified properties. + * Creates a new Explicit instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IRowLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout instance + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance */ - RowLayout.create = function create(properties) { - return new RowLayout(properties); + Explicit.create = function create(properties) { + return new Explicit(properties); }; /** - * Encodes the specified RowLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encode = function encode(message, writer) { + Explicit.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.monitoring.dashboard.v1.RowLayout.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified RowLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.verify|verify} messages. + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.IRowLayout} message RowLayout message or plain object to encode + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RowLayout.encodeDelimited = function encodeDelimited(message, writer) { + Explicit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RowLayout message from the specified reader or buffer. + * Decodes an Explicit message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decode = function decode(reader, length) { + Explicit.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); break; default: reader.skipType(tag & 7); @@ -12125,6278 +11038,8006 @@ }; /** - * Decodes a RowLayout message from the specified reader or buffer, length delimited. + * Decodes an Explicit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RowLayout.decodeDelimited = function decodeDelimited(reader) { + Explicit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RowLayout message. + * Verifies an Explicit message. * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RowLayout.verify = function verify(message) { + Explicit.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.RowLayout.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; } return null; }; /** - * Creates a RowLayout message from a plain object. Also converts values to their respective internal types. + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout} RowLayout + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit */ - RowLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout) + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout(); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.rows: object expected"); - message.rows[i] = $root.google.monitoring.dashboard.v1.RowLayout.Row.fromObject(object.rows[i]); - } + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); } return message; }; /** - * Creates a plain object from a RowLayout message. Also converts values to other types if specified. + * Creates a plain object from an Explicit message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @static - * @param {google.monitoring.dashboard.v1.RowLayout} message RowLayout + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RowLayout.toObject = function toObject(message, options) { + Explicit.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rows = []; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.monitoring.dashboard.v1.RowLayout.Row.toObject(message.rows[j], options); + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; } return object; }; /** - * Converts this RowLayout to JSON. + * Converts this Explicit to JSON. * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout + * @memberof google.api.Distribution.BucketOptions.Explicit * @instance * @returns {Object.} JSON object */ - RowLayout.prototype.toJSON = function toJSON() { + Explicit.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - RowLayout.Row = (function() { + return Explicit; + })(); - /** - * Properties of a Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @interface IRow - * @property {number|Long|null} [weight] Row weight - * @property {Array.|null} [widgets] Row widgets - */ + return BucketOptions; + })(); + + Distribution.Exemplar = (function() { + + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ + + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; + + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; + + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; + + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.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); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Row. - * @memberof google.monitoring.dashboard.v1.RowLayout - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.widgets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function 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.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + case 2: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Row weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @instance - */ - Row.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Row widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @instance - */ - Row.prototype.widgets = $util.emptyArray; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.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"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; - /** - * Encodes the specified Row message. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.RowLayout.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {google.monitoring.dashboard.v1.RowLayout.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; + }; - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.weight = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Exemplar; + })(); - /** - * Verifies a Row message. - * @function verify - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } - } - return null; - }; + return Distribution; + })(); - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.RowLayout.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.RowLayout.Row) - return object; - var message = new $root.google.monitoring.dashboard.v1.RowLayout.Row(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.RowLayout.Row.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } - } - return message; - }; + api.Http = (function() { - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @static - * @param {google.monitoring.dashboard.v1.RowLayout.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); - } - return object; - }; + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.RowLayout.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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]]; + } - return Row; - })(); + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; - return RowLayout; - })(); + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; - v1.ColumnLayout = (function() { + /** + * 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()); + }; - /** - * Properties of a ColumnLayout. - * @memberof google.monitoring.dashboard.v1 - * @interface IColumnLayout - * @property {Array.|null} [columns] ColumnLayout columns - */ + /** + * 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; + }; - /** - * Constructs a new ColumnLayout. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ColumnLayout. - * @implements IColumnLayout - * @constructor - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set - */ - function ColumnLayout(properties) { - this.columns = []; - if (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 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; + }; - /** - * ColumnLayout columns. - * @member {Array.} columns - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @instance - */ - ColumnLayout.prototype.columns = $util.emptyArray; + /** + * 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; + }; - /** - * Creates a new ColumnLayout instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout instance - */ - ColumnLayout.create = function create(properties) { - return new ColumnLayout(properties); - }; + /** + * 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); + }; - /** - * Encodes the specified ColumnLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnLayout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.monitoring.dashboard.v1.ColumnLayout.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + return Http; + })(); - /** - * Encodes the specified ColumnLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.IColumnLayout} message ColumnLayout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnLayout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + api.HttpRule = (function() { - /** - * Decodes a ColumnLayout message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnLayout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 + */ - /** - * Decodes a ColumnLayout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnLayout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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]]; + } - /** - * Verifies a ColumnLayout message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnLayout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; - /** - * Creates a ColumnLayout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout} ColumnLayout - */ - ColumnLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout) - return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.columns: object expected"); - message.columns[i] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.fromObject(object.columns[i]); - } - } - return message; - }; + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; - /** - * Creates a plain object from a ColumnLayout message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout} message ColumnLayout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnLayout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.monitoring.dashboard.v1.ColumnLayout.Column.toObject(message.columns[j], options); - } - return object; - }; + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; - /** - * Converts this ColumnLayout to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @instance - * @returns {Object.} JSON object - */ - ColumnLayout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; - ColumnLayout.Column = (function() { + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; - /** - * Properties of a Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @interface IColumn - * @property {number|Long|null} [weight] Column weight - * @property {Array.|null} [widgets] Column widgets - */ + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; - /** - * Constructs a new Column. - * @memberof google.monitoring.dashboard.v1.ColumnLayout - * @classdesc Represents a Column. - * @implements IColumn - * @constructor - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set - */ - function Column(properties) { - this.widgets = []; - if (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 custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; - /** - * Column weight. - * @member {number|Long} weight - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - */ - Column.prototype.weight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; - /** - * Column widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - */ - Column.prototype.widgets = $util.emptyArray; + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; - /** - * Creates a new Column instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column instance - */ - Column.create = function create(properties) { - return new Column(properties); - }; + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; - /** - * Encodes the specified Column message. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.weight); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ColumnLayout.Column.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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) + }); - /** - * Decodes a Column message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.weight = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes a Column message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a Column message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Column.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight) && !(message.weight && $util.isInteger(message.weight.low) && $util.isInteger(message.weight.high))) - return "weight: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } - } - return null; - }; + /** + * 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(); + }; - /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ColumnLayout.Column} Column - */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ColumnLayout.Column) - return object; - var message = new $root.google.monitoring.dashboard.v1.ColumnLayout.Column(); - if (object.weight != null) - if ($util.Long) - (message.weight = $util.Long.fromValue(object.weight)).unsigned = false; - else if (typeof object.weight === "string") - message.weight = parseInt(object.weight, 10); - else if (typeof object.weight === "number") - message.weight = object.weight; - else if (typeof object.weight === "object") - message.weight = new $util.LongBits(object.weight.low >>> 0, object.weight.high >>> 0).toNumber(); - if (object.widgets) { - if (!Array.isArray(object.widgets)) - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: array expected"); - message.widgets = []; - for (var i = 0; i < object.widgets.length; ++i) { - if (typeof object.widgets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ColumnLayout.Column.widgets: object expected"); - message.widgets[i] = $root.google.monitoring.dashboard.v1.Widget.fromObject(object.widgets[i]); - } - } - return message; - }; + /** + * 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; + }; - /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @static - * @param {google.monitoring.dashboard.v1.ColumnLayout.Column} message Column - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Column.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.widgets = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.weight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.weight = options.longs === String ? "0" : 0; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight === "number") - object.weight = options.longs === String ? String(message.weight) : message.weight; - else - object.weight = options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() : message.weight; - if (message.widgets && message.widgets.length) { - object.widgets = []; - for (var j = 0; j < message.widgets.length; ++j) - object.widgets[j] = $root.google.monitoring.dashboard.v1.Widget.toObject(message.widgets[j], options); - } - return object; - }; + /** + * 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()); + }; - /** - * Converts this Column to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column - * @instance - * @returns {Object.} JSON object - */ - Column.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return Column; - })(); + /** + * 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; + }; - return ColumnLayout; - })(); + /** + * 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; + }; - v1.Widget = (function() { + /** + * 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); + }; - /** - * Properties of a Widget. - * @memberof google.monitoring.dashboard.v1 - * @interface IWidget - * @property {string|null} [title] Widget title - * @property {google.monitoring.dashboard.v1.IXyChart|null} [xyChart] Widget xyChart - * @property {google.monitoring.dashboard.v1.IScorecard|null} [scorecard] Widget scorecard - * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text - * @property {google.protobuf.IEmpty|null} [blank] Widget blank - */ + return HttpRule; + })(); - /** - * Constructs a new Widget. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Widget. - * @implements IWidget - * @constructor - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set - */ - function Widget(properties) { - if (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.CustomHttpPattern = (function() { - /** - * Widget title. - * @member {string} title - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.title = ""; + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ - /** - * Widget xyChart. - * @member {google.monitoring.dashboard.v1.IXyChart|null|undefined} xyChart - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.xyChart = null; + /** + * 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]]; + } - /** - * Widget scorecard. - * @member {google.monitoring.dashboard.v1.IScorecard|null|undefined} scorecard - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.scorecard = null; + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; - /** - * Widget text. - * @member {google.monitoring.dashboard.v1.IText|null|undefined} text - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.text = null; + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; - /** - * Widget blank. - * @member {google.protobuf.IEmpty|null|undefined} blank - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Widget.prototype.blank = null; + /** + * 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); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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; + }; - /** - * Widget content. - * @member {"xyChart"|"scorecard"|"text"|"blank"|undefined} content - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - */ - Object.defineProperty(Widget.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * 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(); + }; - /** - * Creates a new Widget instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {google.monitoring.dashboard.v1.IWidget=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Widget} Widget instance - */ - Widget.create = function create(properties) { - return new Widget(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified Widget message. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Widget.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.xyChart != null && Object.hasOwnProperty.call(message, "xyChart")) - $root.google.monitoring.dashboard.v1.XyChart.encode(message.xyChart, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.scorecard != null && Object.hasOwnProperty.call(message, "scorecard")) - $root.google.monitoring.dashboard.v1.Scorecard.encode(message.scorecard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.monitoring.dashboard.v1.Text.encode(message.text, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.blank != null && Object.hasOwnProperty.call(message, "blank")) - $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * 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()); + }; - /** - * Encodes the specified Widget message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Widget.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {google.monitoring.dashboard.v1.IWidget} message Widget message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Widget.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a Widget message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Widget} Widget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Widget.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Widget(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); - break; - case 3: - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); - break; - case 4: - message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); - break; - case 5: - message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a Widget message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Widget} Widget - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Widget.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a Widget message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Widget.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.XyChart.verify(message.xyChart); - if (error) - return "xyChart." + error; - } - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.verify(message.scorecard); - if (error) - return "scorecard." + error; - } - } - if (message.text != null && message.hasOwnProperty("text")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.monitoring.dashboard.v1.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.blank != null && message.hasOwnProperty("blank")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.protobuf.Empty.verify(message.blank); - if (error) - return "blank." + error; - } - } - return null; - }; + return CustomHttpPattern; + })(); - /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Widget} Widget - */ - Widget.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Widget) - return object; - var message = new $root.google.monitoring.dashboard.v1.Widget(); - if (object.title != null) - message.title = String(object.title); - if (object.xyChart != null) { - if (typeof object.xyChart !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.xyChart: object expected"); - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.fromObject(object.xyChart); - } - if (object.scorecard != null) { - if (typeof object.scorecard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.scorecard: object expected"); - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.fromObject(object.scorecard); - } - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.text: object expected"); - message.text = $root.google.monitoring.dashboard.v1.Text.fromObject(object.text); - } - if (object.blank != null) { - if (typeof object.blank !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Widget.blank: object expected"); - message.blank = $root.google.protobuf.Empty.fromObject(object.blank); - } - return message; - }; + return api; + })(); - /** - * Creates a plain object from a Widget message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {google.monitoring.dashboard.v1.Widget} message Widget - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Widget.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.xyChart != null && message.hasOwnProperty("xyChart")) { - object.xyChart = $root.google.monitoring.dashboard.v1.XyChart.toObject(message.xyChart, options); - if (options.oneofs) - object.content = "xyChart"; - } - if (message.scorecard != null && message.hasOwnProperty("scorecard")) { - object.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.toObject(message.scorecard, options); - if (options.oneofs) - object.content = "scorecard"; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.monitoring.dashboard.v1.Text.toObject(message.text, options); - if (options.oneofs) - object.content = "text"; - } - if (message.blank != null && message.hasOwnProperty("blank")) { - object.blank = $root.google.protobuf.Empty.toObject(message.blank, options); - if (options.oneofs) - object.content = "blank"; - } - return object; - }; + google.protobuf = (function() { - /** - * Converts this Widget to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Widget - * @instance - * @returns {Object.} JSON object - */ - Widget.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; - return Widget; - })(); + 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(); + }; - v1.Scorecard = (function() { + /** + * 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; + }; - /** - * Properties of a Scorecard. - * @memberof google.monitoring.dashboard.v1 - * @interface IScorecard - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] Scorecard timeSeriesQuery - * @property {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null} [gaugeView] Scorecard gaugeView - * @property {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null} [sparkChartView] Scorecard sparkChartView - * @property {Array.|null} [thresholds] Scorecard thresholds - */ + /** + * 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()); + }; - /** - * Constructs a new Scorecard. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Scorecard. - * @implements IScorecard - * @constructor - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set - */ - function Scorecard(properties) { - this.thresholds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a 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; + }; - /** - * Scorecard timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.timeSeriesQuery = null; - - /** - * Scorecard gaugeView. - * @member {google.monitoring.dashboard.v1.Scorecard.IGaugeView|null|undefined} gaugeView - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.gaugeView = 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; + }; - /** - * Scorecard sparkChartView. - * @member {google.monitoring.dashboard.v1.Scorecard.ISparkChartView|null|undefined} sparkChartView - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.sparkChartView = null; + /** + * 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; + }; - /** - * Scorecard thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Scorecard.prototype.thresholds = $util.emptyArray; + /** + * 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); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return FileDescriptorSet; + })(); - /** - * Scorecard dataView. - * @member {"gaugeView"|"sparkChartView"|undefined} dataView - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - */ - Object.defineProperty(Scorecard.prototype, "dataView", { - get: $util.oneOfGetter($oneOfFields = ["gaugeView", "sparkChartView"]), - set: $util.oneOfSetter($oneOfFields) - }); + protobuf.FileDescriptorProto = (function() { - /** - * Creates a new Scorecard instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {google.monitoring.dashboard.v1.IScorecard=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard instance - */ - Scorecard.create = function create(properties) { - return new Scorecard(properties); - }; + /** + * 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 + */ - /** - * Encodes the specified Scorecard message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scorecard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gaugeView != null && Object.hasOwnProperty.call(message, "gaugeView")) - $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.encode(message.gaugeView, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sparkChartView != null && Object.hasOwnProperty.call(message, "sparkChartView")) - $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.encode(message.sparkChartView, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.thresholds != null && message.thresholds.length) - for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * 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]]; + } - /** - * Encodes the specified Scorecard message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {google.monitoring.dashboard.v1.IScorecard} message Scorecard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scorecard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - /** - * Decodes a Scorecard message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scorecard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 4: - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); - break; - case 5: - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Decodes a Scorecard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scorecard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Verifies a Scorecard message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scorecard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; - } - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - properties.dataView = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.verify(message.gaugeView); - if (error) - return "gaugeView." + error; - } - } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - if (properties.dataView === 1) - return "dataView: multiple values"; - properties.dataView = 1; - { - var error = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify(message.sparkChartView); - if (error) - return "sparkChartView." + error; - } - } - if (message.thresholds != null && message.hasOwnProperty("thresholds")) { - if (!Array.isArray(message.thresholds)) - return "thresholds: array expected"; - for (var i = 0; i < message.thresholds.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); - if (error) - return "thresholds." + error; - } - } - return null; - }; + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * Creates a Scorecard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard} Scorecard - */ - Scorecard.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); - } - if (object.gaugeView != null) { - if (typeof object.gaugeView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.gaugeView: object expected"); - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.fromObject(object.gaugeView); - } - if (object.sparkChartView != null) { - if (typeof object.sparkChartView !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.sparkChartView: object expected"); - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.fromObject(object.sparkChartView); - } - if (object.thresholds) { - if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: array expected"); - message.thresholds = []; - for (var i = 0; i < object.thresholds.length; ++i) { - if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.thresholds: object expected"); - message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); - } - } - return message; - }; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * Creates a plain object from a Scorecard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard - * @static - * @param {google.monitoring.dashboard.v1.Scorecard} message Scorecard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scorecard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.thresholds = []; - if (options.defaults) - object.timeSeriesQuery = null; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.gaugeView != null && message.hasOwnProperty("gaugeView")) { - object.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.toObject(message.gaugeView, options); - if (options.oneofs) - object.dataView = "gaugeView"; - } - if (message.sparkChartView != null && message.hasOwnProperty("sparkChartView")) { - object.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.toObject(message.sparkChartView, options); - if (options.oneofs) - object.dataView = "sparkChartView"; - } - if (message.thresholds && message.thresholds.length) { - object.thresholds = []; - for (var j = 0; j < message.thresholds.length; ++j) - object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); - } - return object; - }; + /** + * 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; - /** - * Converts this Scorecard to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard - * @instance - * @returns {Object.} JSON object - */ - Scorecard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - Scorecard.GaugeView = (function() { + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * Properties of a GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface IGaugeView - * @property {number|null} [lowerBound] GaugeView lowerBound - * @property {number|null} [upperBound] GaugeView upperBound - */ + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - /** - * Constructs a new GaugeView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a GaugeView. - * @implements IGaugeView - * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - */ - function GaugeView(properties) { - if (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 syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - /** - * GaugeView lowerBound. - * @member {number} lowerBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.lowerBound = 0; + /** + * 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; + }; - /** - * GaugeView upperBound. - * @member {number} upperBound - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - */ - GaugeView.prototype.upperBound = 0; + /** + * 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 new GaugeView instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView instance - */ - GaugeView.create = function create(properties) { - return new GaugeView(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified GaugeView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.lowerBound); - if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.upperBound); - return writer; - }; + /** + * 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); + }; - /** - * Encodes the specified GaugeView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.GaugeView.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.IGaugeView} message GaugeView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GaugeView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return FileDescriptorProto; + })(); - /** - * Decodes a GaugeView message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lowerBound = reader.double(); - break; - case 2: - message.upperBound = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + protobuf.DescriptorProto = (function() { - /** - * Decodes a GaugeView message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GaugeView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 + */ - /** - * Verifies a GaugeView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GaugeView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - if (typeof message.lowerBound !== "number") - return "lowerBound: number expected"; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - if (typeof message.upperBound !== "number") - return "upperBound: number expected"; - return null; - }; + /** + * 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]]; + } - /** - * Creates a GaugeView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.GaugeView} GaugeView - */ - GaugeView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.GaugeView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.GaugeView(); - if (object.lowerBound != null) - message.lowerBound = Number(object.lowerBound); - if (object.upperBound != null) - message.upperBound = Number(object.upperBound); - return message; - }; + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Creates a plain object from a GaugeView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.GaugeView} message GaugeView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GaugeView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lowerBound = 0; - object.upperBound = 0; - } - if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) - object.lowerBound = options.json && !isFinite(message.lowerBound) ? String(message.lowerBound) : message.lowerBound; - if (message.upperBound != null && message.hasOwnProperty("upperBound")) - object.upperBound = options.json && !isFinite(message.upperBound) ? String(message.upperBound) : message.upperBound; - return object; - }; + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Converts this GaugeView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView - * @instance - * @returns {Object.} JSON object - */ - GaugeView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - return GaugeView; - })(); + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - Scorecard.SparkChartView = (function() { + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Properties of a SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @interface ISparkChartView - * @property {google.monitoring.dashboard.v1.SparkChartType|null} [sparkChartType] SparkChartView sparkChartType - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] SparkChartView minAlignmentPeriod - */ + /** + * 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; - /** - * Constructs a new SparkChartView. - * @memberof google.monitoring.dashboard.v1.Scorecard - * @classdesc Represents a SparkChartView. - * @implements ISparkChartView - * @constructor - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set - */ - function SparkChartView(properties) { - if (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 options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * SparkChartView sparkChartType. - * @member {google.monitoring.dashboard.v1.SparkChartType} sparkChartType - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - */ - SparkChartView.prototype.sparkChartType = 0; + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * SparkChartView minAlignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - */ - SparkChartView.prototype.minAlignmentPeriod = null; + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a new SparkChartView instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView instance - */ - SparkChartView.create = function create(properties) { - return new SparkChartView(properties); - }; + /** + * 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 SparkChartView message. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkChartView.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sparkChartType != null && Object.hasOwnProperty.call(message, "sparkChartType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sparkChartType); - if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * 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 SparkChartView message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Scorecard.SparkChartView.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.ISparkChartView} message SparkChartView message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkChartView.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 SparkChartView message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkChartView.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sparkChartType = reader.int32(); - break; - case 2: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 SparkChartView message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkChartView.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 SparkChartView message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkChartView.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - switch (message.sparkChartType) { - default: - return "sparkChartType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); - if (error) - return "minAlignmentPeriod." + error; - } - return null; - }; + /** + * 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 SparkChartView message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Scorecard.SparkChartView} SparkChartView - */ - SparkChartView.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView) - return object; - var message = new $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView(); - switch (object.sparkChartType) { - case "SPARK_CHART_TYPE_UNSPECIFIED": - case 0: - message.sparkChartType = 0; - break; - case "SPARK_LINE": - case 1: - message.sparkChartType = 1; - break; - case "SPARK_BAR": - case 2: - message.sparkChartType = 2; - break; - } - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.Scorecard.SparkChartView.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; + /** + * 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 SparkChartView message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @static - * @param {google.monitoring.dashboard.v1.Scorecard.SparkChartView} message SparkChartView - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SparkChartView.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sparkChartType = options.enums === String ? "SPARK_CHART_TYPE_UNSPECIFIED" : 0; - object.minAlignmentPeriod = null; - } - if (message.sparkChartType != null && message.hasOwnProperty("sparkChartType")) - object.sparkChartType = options.enums === String ? $root.google.monitoring.dashboard.v1.SparkChartType[message.sparkChartType] : message.sparkChartType; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; + /** + * 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 SparkChartView to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView - * @instance - * @returns {Object.} JSON object - */ - SparkChartView.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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); + }; - return SparkChartView; - })(); + DescriptorProto.ExtensionRange = (function() { - return Scorecard; - })(); + /** + * 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 + */ - v1.TimeSeriesQuery = (function() { + /** + * 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]]; + } - /** - * Properties of a TimeSeriesQuery. - * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesQuery - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilter|null} [timeSeriesFilter] TimeSeriesQuery timeSeriesFilter - * @property {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null} [timeSeriesFilterRatio] TimeSeriesQuery timeSeriesFilterRatio - * @property {string|null} [timeSeriesQueryLanguage] TimeSeriesQuery timeSeriesQueryLanguage - * @property {string|null} [unitOverride] TimeSeriesQuery unitOverride - */ + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * Constructs a new TimeSeriesQuery. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesQuery. - * @implements ITimeSeriesQuery - * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set - */ - function TimeSeriesQuery(properties) { - if (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 end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * TimeSeriesQuery timeSeriesFilter. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilter|null|undefined} timeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.timeSeriesFilter = null; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * TimeSeriesQuery timeSeriesFilterRatio. - * @member {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio|null|undefined} timeSeriesFilterRatio - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.timeSeriesFilterRatio = 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); + }; - /** - * TimeSeriesQuery timeSeriesQueryLanguage. - * @member {string|null|undefined} timeSeriesQueryLanguage - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.timeSeriesQueryLanguage = null; + /** + * 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; + }; - /** - * TimeSeriesQuery unitOverride. - * @member {string} unitOverride - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - TimeSeriesQuery.prototype.unitOverride = ""; + /** + * 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(); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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; + }; - /** - * TimeSeriesQuery source. - * @member {"timeSeriesFilter"|"timeSeriesFilterRatio"|"timeSeriesQueryLanguage"|undefined} source - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - */ - Object.defineProperty(TimeSeriesQuery.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["timeSeriesFilter", "timeSeriesFilterRatio", "timeSeriesQueryLanguage"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * 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()); + }; - /** - * Creates a new TimeSeriesQuery instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery instance - */ - TimeSeriesQuery.create = function create(properties) { - return new TimeSeriesQuery(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified TimeSeriesQuery message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeriesFilter != null && Object.hasOwnProperty.call(message, "timeSeriesFilter")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilter.encode(message.timeSeriesFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSeriesFilterRatio != null && Object.hasOwnProperty.call(message, "timeSeriesFilterRatio")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.encode(message.timeSeriesFilterRatio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeSeriesQueryLanguage != null && Object.hasOwnProperty.call(message, "timeSeriesQueryLanguage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.timeSeriesQueryLanguage); - if (message.unitOverride != null && Object.hasOwnProperty.call(message, "unitOverride")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unitOverride); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified TimeSeriesQuery message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesQuery} message TimeSeriesQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 2: - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); - break; - case 3: - message.timeSeriesQueryLanguage = reader.string(); - break; - case 5: - message.unitOverride = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes a TimeSeriesQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return ExtensionRange; + })(); - /** - * Verifies a TimeSeriesQuery message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - properties.source = 1; - { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.verify(message.timeSeriesFilter); - if (error) - return "timeSeriesFilter." + error; - } - } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify(message.timeSeriesFilterRatio); - if (error) - return "timeSeriesFilterRatio." + error; - } - } - if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.timeSeriesQueryLanguage)) - return "timeSeriesQueryLanguage: string expected"; - } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - if (!$util.isString(message.unitOverride)) - return "unitOverride: string expected"; - return null; - }; + DescriptorProto.ReservedRange = (function() { - /** - * Creates a TimeSeriesQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesQuery} TimeSeriesQuery - */ - TimeSeriesQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesQuery) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesQuery(); - if (object.timeSeriesFilter != null) { - if (typeof object.timeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilter: object expected"); - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.fromObject(object.timeSeriesFilter); - } - if (object.timeSeriesFilterRatio != null) { - if (typeof object.timeSeriesFilterRatio !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesQuery.timeSeriesFilterRatio: object expected"); - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.fromObject(object.timeSeriesFilterRatio); - } - if (object.timeSeriesQueryLanguage != null) - message.timeSeriesQueryLanguage = String(object.timeSeriesQueryLanguage); - if (object.unitOverride != null) - message.unitOverride = String(object.unitOverride); - return message; - }; + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * Creates a plain object from a TimeSeriesQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesQuery} message TimeSeriesQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.unitOverride = ""; - if (message.timeSeriesFilter != null && message.hasOwnProperty("timeSeriesFilter")) { - object.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.toObject(message.timeSeriesFilter, options); - if (options.oneofs) - object.source = "timeSeriesFilter"; - } - if (message.timeSeriesFilterRatio != null && message.hasOwnProperty("timeSeriesFilterRatio")) { - object.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.toObject(message.timeSeriesFilterRatio, options); - if (options.oneofs) - object.source = "timeSeriesFilterRatio"; - } - if (message.timeSeriesQueryLanguage != null && message.hasOwnProperty("timeSeriesQueryLanguage")) { - object.timeSeriesQueryLanguage = message.timeSeriesQueryLanguage; - if (options.oneofs) - object.source = "timeSeriesQueryLanguage"; - } - if (message.unitOverride != null && message.hasOwnProperty("unitOverride")) - object.unitOverride = message.unitOverride; - return object; - }; + /** + * 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]]; + } - /** - * Converts this TimeSeriesQuery to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; - return TimeSeriesQuery; - })(); + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - v1.TimeSeriesFilter = (function() { + /** + * 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); + }; - /** - * Properties of a TimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilter - * @property {string|null} [filter] TimeSeriesFilter filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] TimeSeriesFilter aggregation - * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilter secondaryAggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilter pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilter statisticalTimeSeriesFilter - */ + /** + * 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; + }; - /** - * Constructs a new TimeSeriesFilter. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilter. - * @implements ITimeSeriesFilter - * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set - */ - function TimeSeriesFilter(properties) { - if (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 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; + }; - /** - * TimeSeriesFilter filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.filter = ""; - - /** - * TimeSeriesFilter aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.aggregation = null; + /** + * 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()); + }; - /** - * TimeSeriesFilter secondaryAggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.secondaryAggregation = null; + /** + * 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; + }; - /** - * TimeSeriesFilter pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.pickTimeSeriesFilter = 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; + }; - /** - * TimeSeriesFilter statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - TimeSeriesFilter.prototype.statisticalTimeSeriesFilter = null; + /** + * 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; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * 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); + }; - /** - * TimeSeriesFilter outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - */ - Object.defineProperty(TimeSeriesFilter.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + return ReservedRange; + })(); - /** - * Creates a new TimeSeriesFilter instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter instance - */ - TimeSeriesFilter.create = function create(properties) { - return new TimeSeriesFilter(properties); - }; + return DescriptorProto; + })(); - /** - * Encodes the specified TimeSeriesFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilter.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + protobuf.ExtensionRangeOptions = (function() { - /** - * Encodes the specified TimeSeriesFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilter} message TimeSeriesFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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]]; + } - /** - * Decodes a TimeSeriesFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Verifies a TimeSeriesFilter message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); - if (error) - return "secondaryAggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); - if (error) - return "statisticalTimeSeriesFilter." + error; - } - } - return null; - }; + /** + * 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); + }; - /** - * Creates a TimeSeriesFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilter} TimeSeriesFilter - */ - TimeSeriesFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilter) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilter(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - if (object.secondaryAggregation != null) { - if (typeof object.secondaryAggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.secondaryAggregation: object expected"); - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilter.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); - } - return message; - }; + /** + * 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; + }; - /** - * Creates a plain object from a TimeSeriesFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilter} message TimeSeriesFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; - object.secondaryAggregation = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) - object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; - } - return object; - }; + /** + * 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(); + }; - /** - * Converts this TimeSeriesFilter to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return TimeSeriesFilter; - })(); + /** + * 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; + }; - v1.TimeSeriesFilterRatio = (function() { + /** + * 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; + }; - /** - * Properties of a TimeSeriesFilterRatio. - * @memberof google.monitoring.dashboard.v1 - * @interface ITimeSeriesFilterRatio - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [numerator] TimeSeriesFilterRatio numerator - * @property {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null} [denominator] TimeSeriesFilterRatio denominator - * @property {google.monitoring.dashboard.v1.IAggregation|null} [secondaryAggregation] TimeSeriesFilterRatio secondaryAggregation - * @property {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null} [pickTimeSeriesFilter] TimeSeriesFilterRatio pickTimeSeriesFilter - * @property {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null} [statisticalTimeSeriesFilter] TimeSeriesFilterRatio statisticalTimeSeriesFilter - */ + /** + * 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); + }; - /** - * Constructs a new TimeSeriesFilterRatio. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a TimeSeriesFilterRatio. - * @implements ITimeSeriesFilterRatio - * @constructor - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set - */ - function TimeSeriesFilterRatio(properties) { - if (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 ExtensionRangeOptions; + })(); - /** - * TimeSeriesFilterRatio numerator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} numerator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.numerator = null; + protobuf.FieldDescriptorProto = (function() { - /** - * TimeSeriesFilterRatio denominator. - * @member {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart|null|undefined} denominator - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.denominator = null; + /** + * 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 + */ - /** - * TimeSeriesFilterRatio secondaryAggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} secondaryAggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.secondaryAggregation = null; + /** + * 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]]; + } - /** - * TimeSeriesFilterRatio pickTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IPickTimeSeriesFilter|null|undefined} pickTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.pickTimeSeriesFilter = null; + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - /** - * TimeSeriesFilterRatio statisticalTimeSeriesFilter. - * @member {google.monitoring.dashboard.v1.IStatisticalTimeSeriesFilter|null|undefined} statisticalTimeSeriesFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - TimeSeriesFilterRatio.prototype.statisticalTimeSeriesFilter = null; + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * TimeSeriesFilterRatio outputFilter. - * @member {"pickTimeSeriesFilter"|"statisticalTimeSeriesFilter"|undefined} outputFilter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - */ - Object.defineProperty(TimeSeriesFilterRatio.prototype, "outputFilter", { - get: $util.oneOfGetter($oneOfFields = ["pickTimeSeriesFilter", "statisticalTimeSeriesFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - /** - * Creates a new TimeSeriesFilterRatio instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio instance - */ - TimeSeriesFilterRatio.create = function create(properties) { - return new TimeSeriesFilterRatio(properties); - }; + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - /** - * Encodes the specified TimeSeriesFilterRatio message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilterRatio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.numerator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) - $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.encode(message.denominator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.pickTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "pickTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.encode(message.pickTimeSeriesFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.statisticalTimeSeriesFilter != null && Object.hasOwnProperty.call(message, "statisticalTimeSeriesFilter")) - $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.encode(message.statisticalTimeSeriesFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * Encodes the specified TimeSeriesFilterRatio message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {google.monitoring.dashboard.v1.ITimeSeriesFilterRatio} message TimeSeriesFilterRatio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesFilterRatio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilterRatio.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 2: - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - /** - * Decodes a TimeSeriesFilterRatio message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesFilterRatio.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * Verifies a TimeSeriesFilterRatio message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesFilterRatio.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.numerator != null && message.hasOwnProperty("numerator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.numerator); - if (error) - return "numerator." + error; - } - if (message.denominator != null && message.hasOwnProperty("denominator")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify(message.denominator); - if (error) - return "denominator." + error; - } - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.secondaryAggregation); - if (error) - return "secondaryAggregation." + error; - } - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.verify(message.pickTimeSeriesFilter); - if (error) - return "pickTimeSeriesFilter." + error; - } - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - if (properties.outputFilter === 1) - return "outputFilter: multiple values"; - properties.outputFilter = 1; - { - var error = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.verify(message.statisticalTimeSeriesFilter); - if (error) - return "statisticalTimeSeriesFilter." + error; - } - } - return null; - }; + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; - /** - * Creates a TimeSeriesFilterRatio message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} TimeSeriesFilterRatio - */ - TimeSeriesFilterRatio.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio(); - if (object.numerator != null) { - if (typeof object.numerator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.numerator: object expected"); - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.numerator); - } - if (object.denominator != null) { - if (typeof object.denominator !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.denominator: object expected"); - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.fromObject(object.denominator); - } - if (object.secondaryAggregation != null) { - if (typeof object.secondaryAggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.secondaryAggregation: object expected"); - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.secondaryAggregation); - } - if (object.pickTimeSeriesFilter != null) { - if (typeof object.pickTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.pickTimeSeriesFilter: object expected"); - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.fromObject(object.pickTimeSeriesFilter); - } - if (object.statisticalTimeSeriesFilter != null) { - if (typeof object.statisticalTimeSeriesFilter !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.statisticalTimeSeriesFilter: object expected"); - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.fromObject(object.statisticalTimeSeriesFilter); - } - return message; - }; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; - /** - * Creates a plain object from a TimeSeriesFilterRatio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio} message TimeSeriesFilterRatio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesFilterRatio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numerator = null; - object.denominator = null; - object.secondaryAggregation = null; - } - if (message.numerator != null && message.hasOwnProperty("numerator")) - object.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.numerator, options); - if (message.denominator != null && message.hasOwnProperty("denominator")) - object.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.toObject(message.denominator, options); - if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) - object.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.secondaryAggregation, options); - if (message.pickTimeSeriesFilter != null && message.hasOwnProperty("pickTimeSeriesFilter")) { - object.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.toObject(message.pickTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "pickTimeSeriesFilter"; - } - if (message.statisticalTimeSeriesFilter != null && message.hasOwnProperty("statisticalTimeSeriesFilter")) { - object.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.toObject(message.statisticalTimeSeriesFilter, options); - if (options.oneofs) - object.outputFilter = "statisticalTimeSeriesFilter"; - } - return object; - }; + /** + * 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); + }; - /** - * Converts this TimeSeriesFilterRatio to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesFilterRatio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - TimeSeriesFilterRatio.RatioPart = (function() { + /** + * 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(); + }; - /** - * Properties of a RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @interface IRatioPart - * @property {string|null} [filter] RatioPart filter - * @property {google.monitoring.dashboard.v1.IAggregation|null} [aggregation] RatioPart aggregation - */ + /** + * 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; + }; - /** - * Constructs a new RatioPart. - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio - * @classdesc Represents a RatioPart. - * @implements IRatioPart - * @constructor - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set - */ - function RatioPart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a 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()); + }; - /** - * RatioPart filter. - * @member {string} filter - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - */ - RatioPart.prototype.filter = ""; + /** + * 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; + }; - /** - * RatioPart aggregation. - * @member {google.monitoring.dashboard.v1.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - */ - RatioPart.prototype.aggregation = 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 new RatioPart instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart instance - */ - RatioPart.create = function create(properties) { - return new RatioPart(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified RatioPart message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatioPart.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.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) - $root.google.monitoring.dashboard.v1.Aggregation.encode(message.aggregation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * 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); + }; - /** - * Encodes the specified RatioPart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.IRatioPart} message RatioPart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RatioPart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + })(); - /** - * Decodes a RatioPart message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatioPart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + })(); - /** - * Decodes a RatioPart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RatioPart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return FieldDescriptorProto; + })(); - /** - * Verifies a RatioPart message. - * @function verify - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RatioPart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.dashboard.v1.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - return null; - }; + protobuf.OneofDescriptorProto = (function() { - /** - * Creates a RatioPart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} RatioPart - */ - RatioPart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart) - return object; - var message = new $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.aggregation: object expected"); - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.fromObject(object.aggregation); - } - return message; - }; + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - /** - * Creates a plain object from a RatioPart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @static - * @param {google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart} message RatioPart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RatioPart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.aggregation = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.toObject(message.aggregation, options); - return object; - }; + /** + * 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]]; + } - /** - * Converts this RatioPart to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart - * @instance - * @returns {Object.} JSON object - */ - RatioPart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - return RatioPart; - })(); + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - return TimeSeriesFilterRatio; - })(); + /** + * 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); + }; - v1.Threshold = (function() { + /** + * 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; + }; - /** - * Properties of a Threshold. - * @memberof google.monitoring.dashboard.v1 - * @interface IThreshold - * @property {string|null} [label] Threshold label - * @property {number|null} [value] Threshold value - * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color - * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction - */ + /** + * 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(); + }; - /** - * Constructs a new Threshold. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Threshold. - * @implements IThreshold - * @constructor - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set - */ - function Threshold(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes an 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; + }; - /** - * Threshold label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.label = ""; - - /** - * Threshold value. - * @member {number} value - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.value = 0; + /** + * 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()); + }; - /** - * Threshold color. - * @member {google.monitoring.dashboard.v1.Threshold.Color} color - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.color = 0; + /** + * 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; + }; - /** - * Threshold direction. - * @member {google.monitoring.dashboard.v1.Threshold.Direction} direction - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - */ - Threshold.prototype.direction = 0; + /** + * 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 new Threshold instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {google.monitoring.dashboard.v1.IThreshold=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold instance - */ - Threshold.create = function create(properties) { - return new Threshold(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified Threshold message. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Threshold.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.value); - if (message.color != null && Object.hasOwnProperty.call(message, "color")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); - return writer; - }; + /** + * 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); + }; - /** - * Encodes the specified Threshold message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Threshold.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {google.monitoring.dashboard.v1.IThreshold} message Threshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Threshold.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return OneofDescriptorProto; + })(); - /** - * Decodes a Threshold message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Threshold.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Threshold(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.value = reader.double(); - break; - case 3: - message.color = reader.int32(); - break; - case 4: - message.direction = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + protobuf.EnumDescriptorProto = (function() { - /** - * Decodes a Threshold message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Threshold.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 + */ - /** - * Verifies a Threshold message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Threshold.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.color != null && message.hasOwnProperty("color")) - switch (message.color) { - default: - return "color: enum value expected"; - case 0: - case 4: - case 6: - break; - } - if (message.direction != null && message.hasOwnProperty("direction")) - switch (message.direction) { - default: - return "direction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * 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]]; + } - /** - * Creates a Threshold message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Threshold} Threshold - */ - Threshold.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Threshold) - return object; - var message = new $root.google.monitoring.dashboard.v1.Threshold(); - if (object.label != null) - message.label = String(object.label); - if (object.value != null) - message.value = Number(object.value); - switch (object.color) { - case "COLOR_UNSPECIFIED": - case 0: - message.color = 0; - break; - case "YELLOW": - case 4: - message.color = 4; - break; - case "RED": - case 6: - message.color = 6; - break; - } - switch (object.direction) { - case "DIRECTION_UNSPECIFIED": - case 0: - message.direction = 0; - break; - case "ABOVE": - case 1: - message.direction = 1; - break; - case "BELOW": - case 2: - message.direction = 2; - break; - } - return message; - }; + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * Creates a plain object from a Threshold message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Threshold - * @static - * @param {google.monitoring.dashboard.v1.Threshold} message Threshold - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Threshold.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.value = 0; - object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; - object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; - } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.color != null && message.hasOwnProperty("color")) - object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; - return object; - }; + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * Converts this Threshold to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Threshold - * @instance - * @returns {Object.} JSON object - */ - Threshold.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - /** - * Color enum. - * @name google.monitoring.dashboard.v1.Threshold.Color - * @enum {number} - * @property {number} COLOR_UNSPECIFIED=0 COLOR_UNSPECIFIED value - * @property {number} YELLOW=4 YELLOW value - * @property {number} RED=6 RED value - */ - Threshold.Color = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COLOR_UNSPECIFIED"] = 0; - values[valuesById[4] = "YELLOW"] = 4; - values[valuesById[6] = "RED"] = 6; - return values; - })(); + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Direction enum. - * @name google.monitoring.dashboard.v1.Threshold.Direction - * @enum {number} - * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value - * @property {number} ABOVE=1 ABOVE value - * @property {number} BELOW=2 BELOW value - */ - Threshold.Direction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ABOVE"] = 1; - values[valuesById[2] = "BELOW"] = 2; - return values; - })(); + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - return Threshold; - })(); + /** + * 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); + }; - /** - * SparkChartType enum. - * @name google.monitoring.dashboard.v1.SparkChartType - * @enum {number} - * @property {number} SPARK_CHART_TYPE_UNSPECIFIED=0 SPARK_CHART_TYPE_UNSPECIFIED value - * @property {number} SPARK_LINE=1 SPARK_LINE value - * @property {number} SPARK_BAR=2 SPARK_BAR value - */ - v1.SparkChartType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPARK_CHART_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_LINE"] = 1; - values[valuesById[2] = "SPARK_BAR"] = 2; - return values; - })(); + /** + * 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; + }; - v1.Text = (function() { + /** + * 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()); + }; - /** - * Properties of a Text. - * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format - */ + /** + * 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; + }; - /** - * Constructs a new Text. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - */ - function Text(properties) { - if (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 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; + }; - /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.content = ""; + /** + * 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; + }; - /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.format = 0; + /** + * 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); + }; - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; + EnumDescriptorProto.EnumReservedRange = (function() { - /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); - return writer; - }; + /** + * 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]]; + } - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; - /** - * Decodes a Text message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Text(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.format = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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); + }; - /** - * Verifies a Text message. - * @function verify - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Text.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * 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; + }; - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.Text) - return object; - var message = new $root.google.monitoring.dashboard.v1.Text(); - if (object.content != null) - message.content = String(object.content); - switch (object.format) { - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "MARKDOWN": + /** + * 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.format = 1; + message.start = reader.int32(); break; - case "RAW": case 2: - message.format = 2; + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.Text - * @static - * @param {google.monitoring.dashboard.v1.Text} message Text - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Text.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = ""; - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.monitoring.dashboard.v1.Text.Format[message.format] : message.format; - return object; - }; + /** + * 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()); + }; - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - /** - * Format enum. - * @name google.monitoring.dashboard.v1.Text.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} MARKDOWN=1 MARKDOWN value - * @property {number} RAW=2 RAW value - */ - Text.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "MARKDOWN"] = 1; - values[valuesById[2] = "RAW"] = 2; - return values; - })(); + /** + * 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; + }; - return Text; - })(); + /** + * 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; + }; - v1.XyChart = (function() { + /** + * 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); + }; - /** - * Properties of a XyChart. - * @memberof google.monitoring.dashboard.v1 - * @interface IXyChart - * @property {Array.|null} [dataSets] XyChart dataSets - * @property {google.protobuf.IDuration|null} [timeshiftDuration] XyChart timeshiftDuration - * @property {Array.|null} [thresholds] XyChart thresholds - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis - * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis - * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions - */ + return EnumReservedRange; + })(); - /** - * Constructs a new XyChart. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a XyChart. - * @implements IXyChart - * @constructor - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - */ - function XyChart(properties) { - this.dataSets = []; - this.thresholds = []; - if (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 EnumDescriptorProto; + })(); - /** - * XyChart dataSets. - * @member {Array.} dataSets - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.dataSets = $util.emptyArray; + protobuf.EnumValueDescriptorProto = (function() { - /** - * XyChart timeshiftDuration. - * @member {google.protobuf.IDuration|null|undefined} timeshiftDuration - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.timeshiftDuration = null; + /** + * 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 + */ - /** - * XyChart thresholds. - * @member {Array.} thresholds - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.thresholds = $util.emptyArray; + /** + * 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]]; + } - /** - * XyChart xAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} xAxis - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.xAxis = null; + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * XyChart yAxis. - * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} yAxis - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.yAxis = null; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; - /** - * XyChart chartOptions. - * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - */ - XyChart.prototype.chartOptions = null; + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; - /** - * Creates a new XyChart instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {google.monitoring.dashboard.v1.IXyChart=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart instance - */ - XyChart.create = function create(properties) { - return new XyChart(properties); - }; + /** + * 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 XyChart message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - XyChart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSets != null && message.dataSets.length) - for (var i = 0; i < message.dataSets.length; ++i) - $root.google.monitoring.dashboard.v1.XyChart.DataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeshiftDuration != null && Object.hasOwnProperty.call(message, "timeshiftDuration")) - $root.google.protobuf.Duration.encode(message.timeshiftDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.thresholds != null && message.thresholds.length) - for (var i = 0; i < message.thresholds.length; ++i) - $root.google.monitoring.dashboard.v1.Threshold.encode(message.thresholds[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.xAxis != null && Object.hasOwnProperty.call(message, "xAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.xAxis, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yAxis != null && Object.hasOwnProperty.call(message, "yAxis")) - $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) - $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; + /** + * 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 XyChart message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {google.monitoring.dashboard.v1.IXyChart} message XyChart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - XyChart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 a XyChart message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - XyChart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dataSets && message.dataSets.length)) - message.dataSets = []; - message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); - break; - case 4: - message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); - break; - case 6: - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 7: - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 8: - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 a XyChart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - XyChart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 a XyChart message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - XyChart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSets != null && message.hasOwnProperty("dataSets")) { - if (!Array.isArray(message.dataSets)) - return "dataSets: array expected"; - for (var i = 0; i < message.dataSets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.XyChart.DataSet.verify(message.dataSets[i]); - if (error) - return "dataSets." + error; - } - } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) { - var error = $root.google.protobuf.Duration.verify(message.timeshiftDuration); - if (error) - return "timeshiftDuration." + error; - } - if (message.thresholds != null && message.hasOwnProperty("thresholds")) { - if (!Array.isArray(message.thresholds)) - return "thresholds: array expected"; - for (var i = 0; i < message.thresholds.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Threshold.verify(message.thresholds[i]); - if (error) - return "thresholds." + error; - } - } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.xAxis); - if (error) - return "xAxis." + error; - } - if (message.yAxis != null && message.hasOwnProperty("yAxis")) { - var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.yAxis); - if (error) - return "yAxis." + error; - } - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { - var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); - if (error) - return "chartOptions." + error; - } - return null; - }; + /** + * 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; + }; - /** - * Creates a XyChart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart} XyChart - */ - XyChart.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart(); - if (object.dataSets) { - if (!Array.isArray(object.dataSets)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: array expected"); - message.dataSets = []; - for (var i = 0; i < object.dataSets.length; ++i) { - if (typeof object.dataSets[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.dataSets: object expected"); - message.dataSets[i] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.fromObject(object.dataSets[i]); - } - } - if (object.timeshiftDuration != null) { - if (typeof object.timeshiftDuration !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.timeshiftDuration: object expected"); - message.timeshiftDuration = $root.google.protobuf.Duration.fromObject(object.timeshiftDuration); - } - if (object.thresholds) { - if (!Array.isArray(object.thresholds)) - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: array expected"); - message.thresholds = []; - for (var i = 0; i < object.thresholds.length; ++i) { - if (typeof object.thresholds[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.thresholds: object expected"); - message.thresholds[i] = $root.google.monitoring.dashboard.v1.Threshold.fromObject(object.thresholds[i]); - } - } - if (object.xAxis != null) { - if (typeof object.xAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.xAxis: object expected"); - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.xAxis); - } - if (object.yAxis != null) { - if (typeof object.yAxis !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); - } - if (object.chartOptions != null) { - if (typeof object.chartOptions !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.fromObject(object.chartOptions); - } - return message; - }; + /** + * 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); + }; - /** - * Creates a plain object from a XyChart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart - * @static - * @param {google.monitoring.dashboard.v1.XyChart} message XyChart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - XyChart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataSets = []; - object.thresholds = []; - } - if (options.defaults) { - object.timeshiftDuration = null; - object.xAxis = null; - object.yAxis = null; - object.chartOptions = null; - } - if (message.dataSets && message.dataSets.length) { - object.dataSets = []; - for (var j = 0; j < message.dataSets.length; ++j) - object.dataSets[j] = $root.google.monitoring.dashboard.v1.XyChart.DataSet.toObject(message.dataSets[j], options); - } - if (message.timeshiftDuration != null && message.hasOwnProperty("timeshiftDuration")) - object.timeshiftDuration = $root.google.protobuf.Duration.toObject(message.timeshiftDuration, options); - if (message.thresholds && message.thresholds.length) { - object.thresholds = []; - for (var j = 0; j < message.thresholds.length; ++j) - object.thresholds[j] = $root.google.monitoring.dashboard.v1.Threshold.toObject(message.thresholds[j], options); - } - if (message.xAxis != null && message.hasOwnProperty("xAxis")) - object.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.xAxis, options); - if (message.yAxis != null && message.hasOwnProperty("yAxis")) - object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); - if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) - object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); - return object; - }; + return EnumValueDescriptorProto; + })(); - /** - * Converts this XyChart to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart - * @instance - * @returns {Object.} JSON object - */ - XyChart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.ServiceDescriptorProto = (function() { - XyChart.DataSet = (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 + */ - /** - * Properties of a DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IDataSet - * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] DataSet timeSeriesQuery - * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType - * @property {string|null} [legendTemplate] DataSet legendTemplate - * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod - */ + /** + * 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]]; + } - /** - * Constructs a new DataSet. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents a DataSet. - * @implements IDataSet - * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set - */ - function DataSet(properties) { - if (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 = ""; - /** - * DataSet timeSeriesQuery. - * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.timeSeriesQuery = null; + /** + * 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(); + }; - /** - * DataSet plotType. - * @member {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType} plotType - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.plotType = 0; + /** + * 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; + }; - /** - * DataSet legendTemplate. - * @member {string} legendTemplate - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.legendTemplate = ""; + /** + * 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()); + }; - /** - * DataSet minAlignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - */ - DataSet.prototype.minAlignmentPeriod = null; + /** + * 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 new DataSet instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet instance - */ - DataSet.create = function create(properties) { - return new DataSet(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified DataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) - $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.plotType != null && Object.hasOwnProperty.call(message, "plotType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.plotType); - if (message.legendTemplate != null && Object.hasOwnProperty.call(message, "legendTemplate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); - if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) - $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified DataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.DataSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IDataSet} message DataSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a DataSet message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 2: - message.plotType = reader.int32(); - break; - case 3: - message.legendTemplate = reader.string(); - break; - case 4: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ServiceDescriptorProto; + })(); - /** - * Decodes a DataSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + protobuf.MethodDescriptorProto = (function() { - /** - * Verifies a DataSet message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { - var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); - if (error) - return "timeSeriesQuery." + error; - } - if (message.plotType != null && message.hasOwnProperty("plotType")) - switch (message.plotType) { - default: - return "plotType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - if (!$util.isString(message.legendTemplate)) - return "legendTemplate: string expected"; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); - if (error) - return "minAlignmentPeriod." + error; - } - return null; - }; + /** + * 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 + */ - /** - * Creates a DataSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.DataSet} DataSet - */ - DataSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.DataSet) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.DataSet(); - if (object.timeSeriesQuery != null) { - if (typeof object.timeSeriesQuery !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.timeSeriesQuery: object expected"); - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); - } - switch (object.plotType) { - case "PLOT_TYPE_UNSPECIFIED": - case 0: - message.plotType = 0; - break; - case "LINE": - case 1: - message.plotType = 1; - break; - case "STACKED_AREA": - case 2: - message.plotType = 2; - break; - case "STACKED_BAR": - case 3: - message.plotType = 3; - break; - case "HEATMAP": - case 4: - message.plotType = 4; - break; - } - if (object.legendTemplate != null) - message.legendTemplate = String(object.legendTemplate); - if (object.minAlignmentPeriod != null) { - if (typeof object.minAlignmentPeriod !== "object") - throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); - message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); - } - return message; - }; + /** + * 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]]; + } - /** - * Creates a plain object from a DataSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @static - * @param {google.monitoring.dashboard.v1.XyChart.DataSet} message DataSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeSeriesQuery = null; - object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; - object.legendTemplate = ""; - object.minAlignmentPeriod = null; - } - if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) - object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); - if (message.plotType != null && message.hasOwnProperty("plotType")) - object.plotType = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.PlotType[message.plotType] : message.plotType; - if (message.legendTemplate != null && message.hasOwnProperty("legendTemplate")) - object.legendTemplate = message.legendTemplate; - if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) - object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); - return object; - }; + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * Converts this DataSet to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.DataSet - * @instance - * @returns {Object.} JSON object - */ - DataSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * PlotType enum. - * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType - * @enum {number} - * @property {number} PLOT_TYPE_UNSPECIFIED=0 PLOT_TYPE_UNSPECIFIED value - * @property {number} LINE=1 LINE value - * @property {number} STACKED_AREA=2 STACKED_AREA value - * @property {number} STACKED_BAR=3 STACKED_BAR value - * @property {number} HEATMAP=4 HEATMAP value - */ - DataSet.PlotType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLOT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE"] = 1; - values[valuesById[2] = "STACKED_AREA"] = 2; - values[valuesById[3] = "STACKED_BAR"] = 3; - values[valuesById[4] = "HEATMAP"] = 4; - return values; - })(); + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - return DataSet; - })(); + /** + * 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; + }; - XyChart.Axis = (function() { + /** + * 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(); + }; - /** - * Properties of an Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @interface IAxis - * @property {string|null} [label] Axis label - * @property {google.monitoring.dashboard.v1.XyChart.Axis.Scale|null} [scale] Axis scale - */ + /** + * 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; + }; - /** - * Constructs a new Axis. - * @memberof google.monitoring.dashboard.v1.XyChart - * @classdesc Represents an Axis. - * @implements IAxis - * @constructor - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - */ - function Axis(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a 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()); + }; - /** - * Axis label. - * @member {string} label - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.label = ""; + /** + * 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; + }; - /** - * Axis scale. - * @member {google.monitoring.dashboard.v1.XyChart.Axis.Scale} scale - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - */ - Axis.prototype.scale = 0; + /** + * 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 new Axis instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis instance - */ - Axis.create = function create(properties) { - return new Axis(properties); - }; + /** + * 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; + }; - /** - * Encodes the specified Axis message. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.label); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scale); - return writer; - }; + /** + * 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); + }; - /** - * Encodes the specified Axis message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.XyChart.Axis.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.IAxis} message Axis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Axis.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return MethodDescriptorProto; + })(); - /** - * Decodes an Axis message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.scale = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + protobuf.FileOptions = (function() { - /** - * Decodes an Axis message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Axis.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 + */ - /** - * Verifies an Axis message. - * @function verify - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Axis.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - switch (message.scale) { - default: - return "scale: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * 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]]; + } - /** - * Creates an Axis message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.XyChart.Axis} Axis - */ - Axis.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.XyChart.Axis) - return object; - var message = new $root.google.monitoring.dashboard.v1.XyChart.Axis(); - if (object.label != null) - message.label = String(object.label); - switch (object.scale) { - case "SCALE_UNSPECIFIED": - case 0: - message.scale = 0; - break; - case "LINEAR": - case 1: - message.scale = 1; - break; - case "LOG10": - case 2: - message.scale = 2; - break; - } - return message; - }; + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - /** - * Creates a plain object from an Axis message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @static - * @param {google.monitoring.dashboard.v1.XyChart.Axis} message Axis - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Axis.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.label = ""; - object.scale = options.enums === String ? "SCALE_UNSPECIFIED" : 0; - } - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.Axis.Scale[message.scale] : message.scale; - return object; - }; + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * Converts this Axis to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.XyChart.Axis - * @instance - * @returns {Object.} JSON object - */ - Axis.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Scale enum. - * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale - * @enum {number} - * @property {number} SCALE_UNSPECIFIED=0 SCALE_UNSPECIFIED value - * @property {number} LINEAR=1 LINEAR value - * @property {number} LOG10=2 LOG10 value - */ - Axis.Scale = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINEAR"] = 1; - values[valuesById[2] = "LOG10"] = 2; - return values; - })(); + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - return Axis; - })(); + /** + * 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 = ""; - return XyChart; - })(); + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - v1.ChartOptions = (function() { + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Properties of a ChartOptions. - * @memberof google.monitoring.dashboard.v1 - * @interface IChartOptions - * @property {google.monitoring.dashboard.v1.ChartOptions.Mode|null} [mode] ChartOptions mode - */ + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - /** - * Constructs a new ChartOptions. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ChartOptions. - * @implements IChartOptions - * @constructor - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set - */ - function ChartOptions(properties) { - if (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 phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - /** - * ChartOptions mode. - * @member {google.monitoring.dashboard.v1.ChartOptions.Mode} mode - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @instance - */ - ChartOptions.prototype.mode = 0; + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - /** - * Creates a new ChartOptions instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {google.monitoring.dashboard.v1.IChartOptions=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions instance - */ - ChartOptions.create = function create(properties) { - return new ChartOptions(properties); - }; + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * Encodes the specified ChartOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChartOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - return writer; - }; + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * Encodes the specified ChartOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ChartOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {google.monitoring.dashboard.v1.IChartOptions} message ChartOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChartOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * Decodes a ChartOptions message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChartOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ChartOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mode = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Decodes a ChartOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChartOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * Verifies a ChartOptions message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChartOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * Creates a ChartOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ChartOptions} ChartOptions - */ - ChartOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ChartOptions) - return object; - var message = new $root.google.monitoring.dashboard.v1.ChartOptions(); - switch (object.mode) { - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "COLOR": - case 1: - message.mode = 1; - break; - case "X_RAY": - case 2: - message.mode = 2; - break; - case "STATS": - case 3: - message.mode = 3; - break; - } - return message; - }; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * Creates a plain object from a ChartOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @static - * @param {google.monitoring.dashboard.v1.ChartOptions} message ChartOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChartOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.monitoring.dashboard.v1.ChartOptions.Mode[message.mode] : message.mode; - return object; - }; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Converts this ChartOptions to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ChartOptions - * @instance - * @returns {Object.} JSON object - */ - ChartOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Mode enum. - * @name google.monitoring.dashboard.v1.ChartOptions.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} COLOR=1 COLOR value - * @property {number} X_RAY=2 X_RAY value - * @property {number} STATS=3 STATS value - */ - ChartOptions.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COLOR"] = 1; - values[valuesById[2] = "X_RAY"] = 2; - values[valuesById[3] = "STATS"] = 3; - return values; - })(); + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - return ChartOptions; - })(); + /** + * 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); + }; - v1.DashboardsService = (function() { + /** + * 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; + }; - /** - * Constructs a new DashboardsService service. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a DashboardsService - * @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 DashboardsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + /** + * 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; + }; - (DashboardsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DashboardsService; + /** + * 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()); + }; - /** - * Creates new DashboardsService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @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 {DashboardsService} RPC service. Useful where requests and/or responses are streamed. - */ - DashboardsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * 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; + }; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef CreateDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * 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; + }; - /** - * Calls CreateDashboard. - * @function createDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.CreateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.createDashboard = function createDashboard(request, callback) { - return this.rpcCall(createDashboard, $root.google.monitoring.dashboard.v1.CreateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "CreateDashboard" }); + /** + * 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); + }; - /** - * Calls CreateDashboard. - * @function createDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} request CreateDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + })(); - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef ListDashboardsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} [response] ListDashboardsResponse - */ + return FileOptions; + })(); - /** - * Calls ListDashboards. - * @function listDashboards - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.ListDashboardsCallback} callback Node-style callback called with the error, if any, and ListDashboardsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.listDashboards = function listDashboards(request, callback) { - return this.rpcCall(listDashboards, $root.google.monitoring.dashboard.v1.ListDashboardsRequest, $root.google.monitoring.dashboard.v1.ListDashboardsResponse, request, callback); - }, "name", { value: "ListDashboards" }); + protobuf.MessageOptions = (function() { - /** - * Calls ListDashboards. - * @function listDashboards - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} request ListDashboardsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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 + */ - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef GetDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * 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]]; + } - /** - * Calls GetDashboard. - * @function getDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.GetDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.getDashboard = function getDashboard(request, callback) { - return this.rpcCall(getDashboard, $root.google.monitoring.dashboard.v1.GetDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "GetDashboard" }); + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * Calls GetDashboard. - * @function getDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} request GetDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef DeleteDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * Calls DeleteDashboard. - * @function deleteDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.DeleteDashboardCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.deleteDashboard = function deleteDashboard(request, callback) { - return this.rpcCall(deleteDashboard, $root.google.monitoring.dashboard.v1.DeleteDashboardRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDashboard" }); + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - /** - * Calls DeleteDashboard. - * @function deleteDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} request DeleteDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @typedef UpdateDashboardCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.dashboard.v1.Dashboard} [response] Dashboard - */ + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; - /** - * Calls UpdateDashboard. - * @function updateDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object - * @param {google.monitoring.dashboard.v1.DashboardsService.UpdateDashboardCallback} callback Node-style callback called with the error, if any, and Dashboard - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DashboardsService.prototype.updateDashboard = function updateDashboard(request, callback) { - return this.rpcCall(updateDashboard, $root.google.monitoring.dashboard.v1.UpdateDashboardRequest, $root.google.monitoring.dashboard.v1.Dashboard, request, callback); - }, "name", { value: "UpdateDashboard" }); + /** + * 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); + }; - /** - * Calls UpdateDashboard. - * @function updateDashboard - * @memberof google.monitoring.dashboard.v1.DashboardsService - * @instance - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} request UpdateDashboardRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * 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; + }; - return DashboardsService; - })(); + /** + * 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(); + }; - v1.CreateDashboardRequest = (function() { + /** + * 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; + }; - /** - * Properties of a CreateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface ICreateDashboardRequest - * @property {string|null} [parent] CreateDashboardRequest parent - * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] CreateDashboardRequest dashboard - */ + /** + * 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()); + }; - /** - * Constructs a new CreateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a CreateDashboardRequest. - * @implements ICreateDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set - */ - function CreateDashboardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a 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; + }; - /** - * CreateDashboardRequest parent. - * @member {string} parent - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - */ - CreateDashboardRequest.prototype.parent = ""; + /** + * 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; + }; - /** - * CreateDashboardRequest dashboard. - * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - */ - CreateDashboardRequest.prototype.dashboard = null; + /** + * 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; + }; - /** - * Creates a new CreateDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest instance - */ - CreateDashboardRequest.create = function create(properties) { - return new CreateDashboardRequest(properties); - }; + /** + * 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); + }; - /** - * Encodes the specified CreateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDashboardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + return MessageOptions; + })(); - /** - * Encodes the specified CreateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CreateDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.ICreateDashboardRequest} message CreateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + protobuf.FieldOptions = (function() { - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 + */ - /** - * Decodes a CreateDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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]]; + } - /** - * Verifies a CreateDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDashboardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); - if (error) - return "dashboard." + error; - } - return null; - }; + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; - /** - * Creates a CreateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.CreateDashboardRequest} CreateDashboardRequest - */ - CreateDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.CreateDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.CreateDashboardRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dashboard != null) { - if (typeof object.dashboard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.CreateDashboardRequest.dashboard: object expected"); - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); - } - return message; - }; + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; - /** - * Creates a plain object from a CreateDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.CreateDashboardRequest} message CreateDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDashboardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dashboard = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) - object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); - return object; - }; + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; - /** - * Converts this CreateDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - return CreateDashboardRequest; - })(); + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; - v1.ListDashboardsRequest = (function() { + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; - /** - * Properties of a ListDashboardsRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IListDashboardsRequest - * @property {string|null} [parent] ListDashboardsRequest parent - * @property {number|null} [pageSize] ListDashboardsRequest pageSize - * @property {string|null} [pageToken] ListDashboardsRequest pageToken - */ + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Constructs a new ListDashboardsRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ListDashboardsRequest. - * @implements IListDashboardsRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set - */ - function ListDashboardsRequest(properties) { - if (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 .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - /** - * ListDashboardsRequest parent. - * @member {string} parent - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.parent = ""; + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; - /** - * ListDashboardsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.pageSize = 0; + /** + * 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); + }; - /** - * ListDashboardsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - */ - ListDashboardsRequest.prototype.pageToken = ""; + /** + * 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; + }; - /** - * Creates a new ListDashboardsRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest instance - */ - ListDashboardsRequest.create = function create(properties) { - return new ListDashboardsRequest(properties); - }; + /** + * 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(); + }; - /** - * Encodes the specified ListDashboardsRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + /** + * 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; + }; - /** - * Encodes the specified ListDashboardsRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsRequest} message ListDashboardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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()); + }; - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * 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; } - return message; - }; - - /** - * Decodes a ListDashboardsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + 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; + }; - /** - * Verifies a ListDashboardsRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDashboardsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; + /** + * Creates a 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 ListDashboardsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ListDashboardsRequest} ListDashboardsRequest - */ - ListDashboardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.ListDashboardsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * Creates a plain object from a 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; + }; - /** - * Creates a plain object from a ListDashboardsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @static - * @param {google.monitoring.dashboard.v1.ListDashboardsRequest} message ListDashboardsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDashboardsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * Converts this 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); + }; - /** - * Converts this ListDashboardsRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDashboardsRequest.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; + })(); - return ListDashboardsRequest; - })(); + /** + * 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; + })(); - v1.ListDashboardsResponse = (function() { + return FieldOptions; + })(); - /** - * Properties of a ListDashboardsResponse. - * @memberof google.monitoring.dashboard.v1 - * @interface IListDashboardsResponse - * @property {Array.|null} [dashboards] ListDashboardsResponse dashboards - * @property {string|null} [nextPageToken] ListDashboardsResponse nextPageToken - */ + protobuf.OneofOptions = (function() { - /** - * Constructs a new ListDashboardsResponse. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a ListDashboardsResponse. - * @implements IListDashboardsResponse - * @constructor - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set - */ - function ListDashboardsResponse(properties) { - this.dashboards = []; - if (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 OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * ListDashboardsResponse dashboards. - * @member {Array.} dashboards - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @instance - */ - ListDashboardsResponse.prototype.dashboards = $util.emptyArray; + /** + * 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]]; + } - /** - * ListDashboardsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @instance - */ - ListDashboardsResponse.prototype.nextPageToken = ""; + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a new ListDashboardsResponse instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse instance - */ - ListDashboardsResponse.create = function create(properties) { - return new ListDashboardsResponse(properties); - }; + /** + * 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 ListDashboardsResponse message. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dashboards != null && message.dashboards.length) - for (var i = 0; i < message.dashboards.length; ++i) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboards[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 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 ListDashboardsResponse message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.ListDashboardsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {google.monitoring.dashboard.v1.IListDashboardsResponse} message ListDashboardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDashboardsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 a ListDashboardsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.dashboards && message.dashboards.length)) - message.dashboards = []; - message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 a ListDashboardsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDashboardsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 a ListDashboardsResponse message. - * @function verify - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDashboardsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dashboards != null && message.hasOwnProperty("dashboards")) { - if (!Array.isArray(message.dashboards)) - return "dashboards: array expected"; - for (var i = 0; i < message.dashboards.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboards[i]); - if (error) - return "dashboards." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * 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 a ListDashboardsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.ListDashboardsResponse} ListDashboardsResponse - */ - ListDashboardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.ListDashboardsResponse) - return object; - var message = new $root.google.monitoring.dashboard.v1.ListDashboardsResponse(); - if (object.dashboards) { - if (!Array.isArray(object.dashboards)) - throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: array expected"); - message.dashboards = []; - for (var i = 0; i < object.dashboards.length; ++i) { - if (typeof object.dashboards[i] !== "object") - throw TypeError(".google.monitoring.dashboard.v1.ListDashboardsResponse.dashboards: object expected"); - message.dashboards[i] = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboards[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * 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; + }; - /** - * Creates a plain object from a ListDashboardsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @static - * @param {google.monitoring.dashboard.v1.ListDashboardsResponse} message ListDashboardsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDashboardsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dashboards = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.dashboards && message.dashboards.length) { - object.dashboards = []; - for (var j = 0; j < message.dashboards.length; ++j) - object.dashboards[j] = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboards[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - 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); + }; - /** - * Converts this ListDashboardsResponse to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse - * @instance - * @returns {Object.} JSON object - */ - ListDashboardsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return OneofOptions; + })(); - return ListDashboardsResponse; - })(); + protobuf.EnumOptions = (function() { - v1.GetDashboardRequest = (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 + */ - /** - * Properties of a GetDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IGetDashboardRequest - * @property {string|null} [name] GetDashboardRequest name - */ + /** + * 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]]; + } - /** - * Constructs a new GetDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GetDashboardRequest. - * @implements IGetDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set - */ - function GetDashboardRequest(properties) { - if (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; - /** - * GetDashboardRequest name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @instance - */ - GetDashboardRequest.prototype.name = ""; + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; - /** - * Creates a new GetDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest instance - */ - GetDashboardRequest.create = function create(properties) { - return new GetDashboardRequest(properties); - }; + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified GetDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDashboardRequest.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; - }; + /** + * 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 GetDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GetDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IGetDashboardRequest} message GetDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a GetDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); - 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; - }; + /** + * 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 a GetDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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 a GetDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDashboardRequest.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; - }; + /** + * 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 a GetDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GetDashboardRequest} GetDashboardRequest - */ - GetDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GetDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.GetDashboardRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * 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 a GetDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.GetDashboardRequest} message GetDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDashboardRequest.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; - }; + /** + * 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 GetDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.GetDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - GetDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 GetDashboardRequest; - })(); + return EnumOptions; + })(); - v1.DeleteDashboardRequest = (function() { + protobuf.EnumValueOptions = (function() { - /** - * Properties of a DeleteDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IDeleteDashboardRequest - * @property {string|null} [name] DeleteDashboardRequest name - */ + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ - /** - * Constructs a new DeleteDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a DeleteDashboardRequest. - * @implements IDeleteDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set - */ - function DeleteDashboardRequest(properties) { - if (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 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]]; + } - /** - * DeleteDashboardRequest name. - * @member {string} name - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @instance - */ - DeleteDashboardRequest.prototype.name = ""; + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; - /** - * Creates a new DeleteDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest instance - */ - DeleteDashboardRequest.create = function create(properties) { - return new DeleteDashboardRequest(properties); - }; + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified DeleteDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDashboardRequest.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; - }; + /** + * 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 DeleteDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DeleteDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IDeleteDashboardRequest} message DeleteDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a DeleteDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); - 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; - }; + /** + * 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 a DeleteDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a DeleteDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDashboardRequest.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; - }; + /** + * 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()); + }; - /** - * Creates a DeleteDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.DeleteDashboardRequest} DeleteDashboardRequest - */ - DeleteDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.DeleteDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.DeleteDashboardRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * 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 a plain object from a DeleteDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.DeleteDashboardRequest} message DeleteDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDashboardRequest.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; - }; + /** + * 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; + }; - /** - * Converts this DeleteDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return DeleteDashboardRequest; - })(); + /** + * 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); + }; - v1.UpdateDashboardRequest = (function() { + return EnumValueOptions; + })(); - /** - * Properties of an UpdateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @interface IUpdateDashboardRequest - * @property {google.monitoring.dashboard.v1.IDashboard|null} [dashboard] UpdateDashboardRequest dashboard - */ + protobuf.ServiceOptions = (function() { - /** - * Constructs a new UpdateDashboardRequest. - * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents an UpdateDashboardRequest. - * @implements IUpdateDashboardRequest - * @constructor - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set - */ - function UpdateDashboardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a 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 + */ - /** - * UpdateDashboardRequest dashboard. - * @member {google.monitoring.dashboard.v1.IDashboard|null|undefined} dashboard - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @instance - */ - UpdateDashboardRequest.prototype.dashboard = null; + /** + * 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]]; + } - /** - * Creates a new UpdateDashboardRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest instance - */ - UpdateDashboardRequest.create = function create(properties) { - return new UpdateDashboardRequest(properties); - }; + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; - /** - * Encodes the specified UpdateDashboardRequest message. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDashboardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dashboard != null && Object.hasOwnProperty.call(message, "dashboard")) - $root.google.monitoring.dashboard.v1.Dashboard.encode(message.dashboard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified UpdateDashboardRequest message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.UpdateDashboardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.IUpdateDashboardRequest} message UpdateDashboardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDashboardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDashboardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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); + }; - /** - * Decodes an UpdateDashboardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDashboardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies an UpdateDashboardRequest message. - * @function verify - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDashboardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) { - var error = $root.google.monitoring.dashboard.v1.Dashboard.verify(message.dashboard); - if (error) - return "dashboard." + error; - } - return null; - }; + /** + * 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(); + }; - /** - * Creates an UpdateDashboardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.UpdateDashboardRequest} UpdateDashboardRequest - */ - UpdateDashboardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.UpdateDashboardRequest) - return object; - var message = new $root.google.monitoring.dashboard.v1.UpdateDashboardRequest(); - if (object.dashboard != null) { - if (typeof object.dashboard !== "object") - throw TypeError(".google.monitoring.dashboard.v1.UpdateDashboardRequest.dashboard: object expected"); - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.fromObject(object.dashboard); - } - return message; - }; + /** + * 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; + }; - /** - * Creates a plain object from an UpdateDashboardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @static - * @param {google.monitoring.dashboard.v1.UpdateDashboardRequest} message UpdateDashboardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDashboardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dashboard = null; - if (message.dashboard != null && message.hasOwnProperty("dashboard")) - object.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.toObject(message.dashboard, options); - return object; - }; + /** + * 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()); + }; - /** - * Converts this UpdateDashboardRequest to JSON. - * @function toJSON - * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDashboardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return UpdateDashboardRequest; - })(); + /** + * 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; + }; - return v1; - })(); + /** + * 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 dashboard; + return ServiceOptions; })(); - return monitoring; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Distribution = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a Distribution. - * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** - * Constructs a new Distribution. - * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; + 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) @@ -18404,167 +19045,133 @@ } /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; - - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - Distribution.prototype.sumOfSquaredDeviation = 0; + MethodOptions.prototype.deprecated = false; /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - Distribution.prototype.range = null; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance */ - Distribution.prototype.bucketOptions = null; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - Distribution.prototype.bucketCounts = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - Distribution.prototype.exemplars = $util.emptyArray; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution + * @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.api.Distribution} Distribution + * @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 */ - Distribution.decode = function decode(reader, length) { + 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.api.Distribution(); + 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 1: - message.count = reader.int64(); - break; - case 2: - message.mean = reader.double(); - break; - case 3: - message.sumOfSquaredDeviation = reader.double(); + case 33: + message.deprecated = reader.bool(); break; - case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + case 34: + message.idempotencyLevel = reader.int32(); break; - case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; - case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); break; default: reader.skipType(tag & 7); @@ -18575,430 +19182,587 @@ }; /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution + * @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 */ - Distribution.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Distribution message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.api.Distribution + * @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 */ - Distribution.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; + 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.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + 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 "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; + return ".google.api.http." + error; } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; } return null; }; /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution + * @returns {google.protobuf.MethodOptions} MethodOptions */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); + 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.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + 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.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + 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.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); - } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } return message; }; /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.Distribution} message Distribution + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; } if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + 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.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this Distribution to JSON. - * @function toJSON - * @memberof google.api.Distribution + * 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 - * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + UninterpretedOption.prototype.name = $util.emptyArray; - Distribution.Range = (function() { + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max - */ + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set - */ - function Range(properties) { - if (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 negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.min = 0; + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; - /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.max = 0; + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance - */ - Range.create = function create(properties) { - return new Range(properties); - }; + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); - return writer; - }; + /** + * 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 Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a Range message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decode = function 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.Distribution.Range(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min = reader.double(); - break; - case 2: - message.max = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * 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 a Range message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Range message. - * @function verify - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Range.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - return null; - }; + } + return message; + }; - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range - */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) - return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - 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()); + }; - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Range.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; + /** + * 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.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + } + 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; + }; - /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.api.Distribution.Range - * @instance - * @returns {Object.} JSON object - */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return Range; - })(); + /** + * 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); + }; - Distribution.BucketOptions = (function() { + UninterpretedOption.NamePart = (function() { /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension */ /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ - function BucketOptions(properties) { + function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19006,954 +19770,970 @@ } /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.linearBuckets = null; - - /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.exponentialBuckets = null; - - /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + NamePart.prototype.namePart = ""; /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); + NamePart.prototype.isExtension = false; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @function create - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); + NamePart.create = function create(properties) { + return new NamePart(properties); }; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @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 */ - BucketOptions.encode = function encode(message, writer) { + NamePart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @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 */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.BucketOptions + * @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.api.Distribution.BucketOptions} BucketOptions + * @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 */ - BucketOptions.decode = function decode(reader, length) { + 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.api.Distribution.BucketOptions(); + 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.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + message.namePart = reader.string(); break; case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); - break; - case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + 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 BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @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 */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BucketOptions message. + * Verifies a NamePart message. * @function verify - * @memberof google.api.Distribution.BucketOptions + * @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 */ - BucketOptions.verify = function verify(message) { + NamePart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; - } - } + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; return null; }; /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); - } + 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 BucketOptions message. Also converts values to other types if specified. + * Creates a plain object from a NamePart message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BucketOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; + * @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 BucketOptions to JSON. + * Converts this NamePart to JSON. * @function toJSON - * @memberof google.api.Distribution.BucketOptions + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance * @returns {Object.} JSON object */ - BucketOptions.prototype.toJSON = function toJSON() { + NamePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BucketOptions.Linear = (function() { - - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ + return NamePart; + })(); - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(properties) { - if (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 UninterpretedOption; + })(); - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; + protobuf.SourceCodeInfo = (function() { - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; + /** + * 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]]; + } - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; + /** + * 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 Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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; + }; - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function 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.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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 Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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; + }; - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; + /** + * 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()); + }; - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; + /** + * 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 plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; + /** + * 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; + }; - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return Linear; - })(); + /** + * 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); + }; - BucketOptions.Exponential = (function() { + SourceCodeInfo.Location = (function() { - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ + /** + * 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 Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(properties) { - if (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 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]]; + } - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function 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.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; + /** + * 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; + }; - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - 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()); + }; - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + /** + * 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; + }; - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return Exponential; - })(); + /** + * 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); + }; - BucketOptions.Explicit = (function() { + return Location; + })(); - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ + return SourceCodeInfo; + })(); - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.GeneratedCodeInfo = (function() { - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; + /** + * 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]]; + } - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function 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.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; - } - return null; - }; + /** + * 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; + }; - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - 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()); + }; - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } - return object; - }; + /** + * 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; + }; - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - return Explicit; - })(); + /** + * 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; + }; - return BucketOptions; - })(); + /** + * 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); + }; - Distribution.Exemplar = (function() { + GeneratedCodeInfo.Annotation = (function() { /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments + * 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 Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function Exemplar(properties) { - this.attachments = []; + function Annotation(properties) { + this.path = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19961,104 +20741,125 @@ } /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Exemplar.prototype.value = 0; + Annotation.prototype.path = $util.emptyArray; /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Exemplar.prototype.timestamp = null; + Annotation.prototype.sourceFile = ""; /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Exemplar.prototype.attachments = $util.emptyArray; + Annotation.prototype.begin = 0; /** - * Creates a new Exemplar instance using the specified properties. + * 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.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @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 */ - Exemplar.encode = function encode(message, writer) { + Annotation.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); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @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 */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Exemplar message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Exemplar + * @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.api.Distribution.Exemplar} Exemplar + * @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 */ - Exemplar.decode = function decode(reader, length) { + 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.api.Distribution.Exemplar(); + 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: - message.value = reader.double(); + 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.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.sourceFile = reader.string(); break; case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -20069,182 +20870,149 @@ }; /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar + * @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 */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Exemplar message. + * Verifies an Annotation message. * @function verify - * @memberof google.api.Distribution.Exemplar + * @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 - */ - Exemplar.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"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } + * @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 Exemplar message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } + 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 Exemplar message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Exemplar.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.attachments = []; + object.path = []; if (options.defaults) { - object.value = 0; - object.timestamp = null; + object.sourceFile = ""; + object.begin = 0; + object.end = 0; } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + 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 Exemplar to JSON. + * Converts this Annotation to JSON. * @function toJSON - * @memberof google.api.Distribution.Exemplar + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance * @returns {Object.} JSON object */ - Exemplar.prototype.toJSON = function toJSON() { + Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Exemplar; + return Annotation; })(); - return Distribution; - })(); - - /** - * 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; + return GeneratedCodeInfo; })(); - api.ResourceDescriptor = (function() { + protobuf.Any = (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 + * 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 ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20252,167 +21020,88 @@ } /** - * 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 + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - ResourceDescriptor.prototype.singular = ""; + Any.prototype.type_url = ""; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IAny} message Any 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(); - } + * @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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.api.ResourceDescriptor(); + 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 = reader.string(); + message.type_url = 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()); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -20423,246 +21112,126 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies an Any message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + Any.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; - } - } + 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 a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.Any} Any */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) 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; - } - } + 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 a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Any * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Any.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]; + 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 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 + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ResourceDescriptor; + return Any; })(); - api.ResourceReference = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * 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 ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function ResourceReference(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20670,88 +21239,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - ResourceReference.prototype.type = ""; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - ResourceReference.prototype.childType = ""; + Timestamp.prototype.nanos = 0; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + 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.api.ResourceReference(); + 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.type = reader.string(); + message.seconds = reader.int64(); break; case 2: - message.childType = reader.string(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -20762,118 +21331,131 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a Timestamp message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.Timestamp} Timestamp */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + 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.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return Timestamp; })(); - api.Http = (function() { + protobuf.Duration = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * 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 Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20881,91 +21463,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - Http.prototype.rules = $util.emptyArray; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + Duration.prototype.nanos = 0; /** - * Creates a new Http instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Http.create = function create(properties) { - return new Http(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + Duration.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.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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.api.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + 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.api.Http(); + 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: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.seconds = reader.int64(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.nanos = reader.int32(); break; default: reader.skipType(tag & 7); @@ -20976,354 +21555,193 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a Duration message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + Duration.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"; + 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 Http message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.protobuf.Duration} Duration */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) 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); + 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 Http message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.protobuf.Duration * @static - * @param {google.api.Http} message Http + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.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.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration * @instance + * @returns {Object.} JSON object */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return Duration; + })(); + + protobuf.Empty = (function() { /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ - 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. + * 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.api.HttpRule + * @memberof google.protobuf.Empty * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.protobuf.Empty * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + Empty.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. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.Empty * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.api.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - 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; @@ -21333,240 +21751,95 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an Empty message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + Empty.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. + * 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.api.HttpRule + * @memberof google.protobuf.Empty * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this HttpRule to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return Empty; })(); - api.CustomHttpPattern = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21574,88 +21847,78 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - CustomHttpPattern.prototype.path = ""; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + FieldMask.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.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + 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: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -21666,99 +21929,102 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a FieldMask message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + FieldMask.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.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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.FieldMask} FieldMask */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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.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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + 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]; } - 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. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return FieldMask; })(); - return api; + return protobuf; })(); return google; diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 2b225e5d04e..6b08991d4d6 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -2,1028 +2,98 @@ "nested": { "google": { "nested": { - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, + "monitoring": { "nested": { - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "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 - } - }, + "dashboard": { "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 + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", + "java_multiple_files": true, + "java_outer_classname": "ServiceMonitoringProto", + "java_package": "com.google.monitoring.dashboard.v1", + "php_namespace": "Google\\Cloud\\Monitoring\\Dashboard\\V1", + "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1" + }, + "nested": { + "AlertChart": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/AlertPolicy", + "(google.api.resource).pattern": "projects/{project}/alertPolicies/{alert_policy}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "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 - } - } - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "monitoring": { - "nested": { - "dashboard": { - "nested": { - "v1": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", - "java_multiple_files": true, - "java_outer_classname": "ServiceMonitoringProto", - "java_package": "com.google.monitoring.dashboard.v1", - "php_namespace": "Google\\Cloud\\Monitoring\\Dashboard\\V1", - "ruby_package": "Google::Cloud::Monitoring::Dashboard::V1" - }, - "nested": { - "Aggregation": { - "fields": { - "alignmentPeriod": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "perSeriesAligner": { - "type": "Aligner", - "id": 2 - }, - "crossSeriesReducer": { - "type": "Reducer", - "id": 4 - }, - "groupByFields": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "Aligner": { - "values": { - "ALIGN_NONE": 0, - "ALIGN_DELTA": 1, - "ALIGN_RATE": 2, - "ALIGN_INTERPOLATE": 3, - "ALIGN_NEXT_OLDER": 4, - "ALIGN_MIN": 10, - "ALIGN_MAX": 11, - "ALIGN_MEAN": 12, - "ALIGN_COUNT": 13, - "ALIGN_SUM": 14, - "ALIGN_STDDEV": 15, - "ALIGN_COUNT_TRUE": 16, - "ALIGN_COUNT_FALSE": 24, - "ALIGN_FRACTION_TRUE": 17, - "ALIGN_PERCENTILE_99": 18, - "ALIGN_PERCENTILE_95": 19, - "ALIGN_PERCENTILE_50": 20, - "ALIGN_PERCENTILE_05": 21, - "ALIGN_PERCENT_CHANGE": 23 - } - }, - "Reducer": { - "values": { - "REDUCE_NONE": 0, - "REDUCE_MEAN": 1, - "REDUCE_MIN": 2, - "REDUCE_MAX": 3, - "REDUCE_SUM": 4, - "REDUCE_STDDEV": 5, - "REDUCE_COUNT": 6, - "REDUCE_COUNT_TRUE": 7, - "REDUCE_COUNT_FALSE": 15, - "REDUCE_FRACTION_TRUE": 8, - "REDUCE_PERCENTILE_99": 9, - "REDUCE_PERCENTILE_95": 10, - "REDUCE_PERCENTILE_50": 11, - "REDUCE_PERCENTILE_05": 12 - } - } - } + "Aggregation": { + "fields": { + "alignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "perSeriesAligner": { + "type": "Aligner", + "id": 2 + }, + "crossSeriesReducer": { + "type": "Reducer", + "id": 4 + }, + "groupByFields": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "Aligner": { + "values": { + "ALIGN_NONE": 0, + "ALIGN_DELTA": 1, + "ALIGN_RATE": 2, + "ALIGN_INTERPOLATE": 3, + "ALIGN_NEXT_OLDER": 4, + "ALIGN_MIN": 10, + "ALIGN_MAX": 11, + "ALIGN_MEAN": 12, + "ALIGN_COUNT": 13, + "ALIGN_SUM": 14, + "ALIGN_STDDEV": 15, + "ALIGN_COUNT_TRUE": 16, + "ALIGN_COUNT_FALSE": 24, + "ALIGN_FRACTION_TRUE": 17, + "ALIGN_PERCENTILE_99": 18, + "ALIGN_PERCENTILE_95": 19, + "ALIGN_PERCENTILE_50": 20, + "ALIGN_PERCENTILE_05": 21, + "ALIGN_PERCENT_CHANGE": 23 + } + }, + "Reducer": { + "values": { + "REDUCE_NONE": 0, + "REDUCE_MEAN": 1, + "REDUCE_MIN": 2, + "REDUCE_MAX": 3, + "REDUCE_SUM": 4, + "REDUCE_STDDEV": 5, + "REDUCE_COUNT": 6, + "REDUCE_COUNT_TRUE": 7, + "REDUCE_COUNT_FALSE": 15, + "REDUCE_FRACTION_TRUE": 8, + "REDUCE_PERCENTILE_99": 9, + "REDUCE_PERCENTILE_95": 10, + "REDUCE_PERCENTILE_50": 11, + "REDUCE_PERCENTILE_05": 12 + } + } + } }, "PickTimeSeriesFilter": { "fields": { @@ -1239,7 +309,8 @@ "xyChart", "scorecard", "text", - "blank" + "blank", + "alertChart" ] } }, @@ -1266,6 +337,10 @@ "blank": { "type": "google.protobuf.Empty", "id": 5 + }, + "alertChart": { + "type": "AlertChart", + "id": 7 } } }, @@ -1721,422 +796,1375 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "ListDashboardsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDashboardsResponse": { + "fields": { + "dashboards": { + "rule": "repeated", + "type": "Dashboard", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDashboardRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" + } + } + } + }, + "DeleteDashboardRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" + } } } }, - "ListDashboardsRequest": { + "UpdateDashboardRequest": { "fields": { - "parent": { - "type": "string", + "dashboard": { + "type": "Dashboard", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageSize": { + "validateOnly": { + "type": "bool", + "id": 3 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "Distribution": { + "fields": { + "count": { + "type": "int64", + "id": 1 + }, + "mean": { + "type": "double", + "id": 2 + }, + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 + }, + "range": { + "type": "Range", + "id": 4 + }, + "bucketOptions": { + "type": "BucketOptions", + "id": 6 + }, + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 + } + }, + "nested": { + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, + "fields": { + "linearBuckets": { + "type": "Linear", + "id": 1 + }, + "exponentialBuckets": { + "type": "Exponential", + "id": 2 + }, + "explicitBuckets": { + "type": "Explicit", + "id": 3 + } + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { "type": "int32", + "id": 1 + }, + "width": { + "type": "double", "id": 2 }, - "pageToken": { - "type": "string", + "offset": { + "type": "double", "id": 3 } } }, - "ListDashboardsResponse": { + "Exponential": { "fields": { - "dashboards": { - "rule": "repeated", - "type": "Dashboard", + "numFiniteBuckets": { + "type": "int32", "id": 1 }, - "nextPageToken": { - "type": "string", + "growthFactor": { + "type": "double", "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } + }, + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 } } + } + } + }, + "Exemplar": { + "fields": { + "value": { + "type": "double", + "id": 1 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "GetDashboardRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" - } - } - } + "end": { + "type": "int32", + "id": 2 }, - "DeleteDashboardRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/Dashboard" - } - } - } + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "UpdateDashboardRequest": { - "fields": { - "dashboard": { - "type": "Dashboard", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } + "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 } } } } - } - } - }, - "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": { - "Distribution": { + }, + "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": { - "count": { - "type": "int64", - "id": 1 - }, - "mean": { - "type": "double", + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", "id": 2 }, - "sumOfSquaredDeviation": { - "type": "double", - "id": 3 - }, - "range": { - "type": "Range", - "id": 4 - }, - "bucketOptions": { - "type": "BucketOptions", - "id": 6 + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } }, - "bucketCounts": { + "uninterpretedOption": { "rule": "repeated", - "type": "int64", - "id": 7 + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } }, - "exemplars": { + "uninterpretedOption": { "rule": "repeated", - "type": "Exemplar", - "id": 10 + "type": "UninterpretedOption", + "id": 999 } }, - "nested": { - "Range": { - "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 - } + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false } }, - "BucketOptions": { - "oneofs": { - "options": { - "oneof": [ - "linearBuckets", - "exponentialBuckets", - "explicitBuckets" - ] - } - }, - "fields": { - "linearBuckets": { - "type": "Linear", - "id": 1 - }, - "exponentialBuckets": { - "type": "Exponential", - "id": 2 - }, - "explicitBuckets": { - "type": "Explicit", - "id": 3 - } - }, - "nested": { - "Linear": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "width": { - "type": "double", - "id": 2 - }, - "offset": { - "type": "double", - "id": 3 - } - } - }, - "Exponential": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "growthFactor": { - "type": "double", - "id": 2 - }, - "scale": { - "type": "double", - "id": 3 - } - } - }, - "Explicit": { - "fields": { - "bounds": { - "rule": "repeated", - "type": "double", - "id": 1 - } - } - } + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false } }, - "Exemplar": { - "fields": { - "value": { - "type": "double", - "id": 1 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "attachments": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } + "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 } } } }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { + "UninterpretedOption": { "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { + "name": { "rule": "repeated", - "type": "string", + "type": "NamePart", "id": 2 }, - "nameField": { + "identifierValue": { "type": "string", "id": 3 }, - "history": { - "type": "History", + "positiveIntValue": { + "type": "uint64", "id": 4 }, - "plural": { - "type": "string", + "negativeIntValue": { + "type": "int64", "id": 5 }, - "singular": { - "type": "string", + "doubleValue": { + "type": "double", "id": 6 }, - "style": { + "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": "Style", - "id": 10 + "type": "Location", + "id": 1 } }, "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 + "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 + } } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 + } + } + }, + "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 + } } } } }, - "ResourceReference": { + "Any": { "fields": { - "type": { + "type_url": { "type": "string", "id": 1 }, - "childType": { - "type": "string", + "value": { + "type": "bytes", "id": 2 } } }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { + "Timestamp": { "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", + "seconds": { + "type": "int64", "id": 1 }, - "fullyDecodeReservedExpansion": { - "type": "bool", + "nanos": { + "type": "int32", "id": 2 } } }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, + "Duration": { "fields": { - "selector": { - "type": "string", + "seconds": { + "type": "int64", "id": 1 }, - "get": { - "type": "string", + "nanos": { + "type": "int32", "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": { + "Empty": { + "fields": {} + }, + "FieldMask": { "fields": { - "kind": { + "paths": { + "rule": "repeated", "type": "string", "id": 1 - }, - "path": { - "type": "string", - "id": 2 } } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" } } } diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index a4ce0db6056..f95627d22dd 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -154,6 +154,9 @@ export class DashboardsServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + alertPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), dashboardPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/dashboards/{dashboard}' ), @@ -344,12 +347,8 @@ export class DashboardsServiceClient { > ): void; /** - * Creates a new custom dashboard. For examples on how you can use this API to - * create dashboards, see [Managing dashboards by - * API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the - * `monitoring.dashboards.create` permission on the specified project. For - * more information about permissions, see [Cloud Identity and Access - * Management](https://cloud.google.com/iam). + * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](/monitoring/dashboards/api-dashboard). + * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](/iam). * * @param {Object} request * The request object that will be sent. @@ -361,6 +360,9 @@ export class DashboardsServiceClient { * The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard * Required. The initial dashboard specification. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the review, but do not actually + * save it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -652,6 +654,9 @@ export class DashboardsServiceClient { * The request object that will be sent. * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard * Required. The dashboard that will replace the existing dashboard. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the review, but do not actually + * save it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -920,6 +925,44 @@ export class DashboardsServiceClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified alertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + alertPolicyPath(project: string, alertPolicy: string) { + return this.pathTemplates.alertPolicyPathTemplate.render({ + project: project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from AlertPolicy resource. + * + * @param {string} alertPolicyName + * A fully-qualified path representing AlertPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAlertPolicyName(alertPolicyName: string) { + return this.pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) + .project; + } + + /** + * Parse the alert_policy from AlertPolicy resource. + * + * @param {string} alertPolicyName + * A fully-qualified path representing AlertPolicy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromAlertPolicyName(alertPolicyName: string) { + return this.pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) + .alert_policy; + } + /** * Return a fully-qualified dashboard resource name string. * diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json index d13ec9f1cd3..18264f8d673 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/monitoring/dashboard/v1/alertchart.proto", "../../protos/google/monitoring/dashboard/v1/common.proto", "../../protos/google/monitoring/dashboard/v1/dashboard.proto", "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 8d203989e4e..837486104bb 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -949,6 +949,58 @@ describe('v1.DashboardsServiceClient', () => { }); describe('Path templates', () => { + describe('alertPolicy', () => { + const fakePath = '/rendered/path/alertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.alertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.alertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('alertPolicyPath', () => { + const result = client.alertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.alertPolicyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAlertPolicyName', () => { + const result = client.matchProjectFromAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.alertPolicyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromAlertPolicyName', () => { + const result = client.matchAlertPolicyFromAlertPolicyName(fakePath); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.alertPolicyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('dashboard', () => { const fakePath = '/rendered/path/dashboard'; const expectedParameters = { From 73d66c4b7a9e354916d9cee77fad5c94e3351529 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 20:40:24 +0000 Subject: [PATCH 129/181] chore: release 2.4.0 (#195) :robot: I have created a release \*beep\* \*boop\* --- ## [2.4.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.4...v2.4.0) (2021-07-07) ### Features * added validation only mode when writing dashboards feat: added alert chart widget ([#194](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/194)) ([867a08c](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/867a08cabca0f96701f5f8975c6f6e5d0522189f)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index ac867a97dd3..b05a7990d40 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.4...v2.4.0) (2021-07-07) + + +### Features + +* added validation only mode when writing dashboards feat: added alert chart widget ([#194](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/194)) ([867a08c](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/867a08cabca0f96701f5f8975c6f6e5d0522189f)) + ### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.3...v2.3.4) (2021-06-29) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 32d30822de3..39f759df458 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.3.4", + "version": "2.4.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 8b84992a5b3..6a85f037823 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.3.4" + "@google-cloud/monitoring-dashboards": "^2.4.0" }, "devDependencies": { "c8": "^7.0.0", From ba7ebe4e9b8074f34428302e72fee034ed95c786 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:46:26 -0400 Subject: [PATCH 130/181] fix(deps): google-gax v2.17.1 (#196) --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 39f759df458..ccf09416853 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -27,7 +27,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From fc784bf88d8c5e1b3dd730e6176a945a7ed9d5b6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 13:27:05 -0700 Subject: [PATCH 131/181] chore: release 2.4.1 (#197) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index b05a7990d40..be55612480a 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.4.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.0...v2.4.1) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#196](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/196)) ([c6c2ae0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/c6c2ae00ea49c80da7668f8383b62cfd17258159)) + ## [2.4.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.3.4...v2.4.0) (2021-07-07) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index ccf09416853..e9b9712079d 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.4.0", + "version": "2.4.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 6a85f037823..f13d8267d60 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.4.0" + "@google-cloud/monitoring-dashboards": "^2.4.1" }, "devDependencies": { "c8": "^7.0.0", From fc30afe5ecaf0e6dbbdbcc8832d16efa03abbd59 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Jul 2021 18:56:25 +0000 Subject: [PATCH 132/181] docs: fixed broken links (#198) PiperOrigin-RevId: 384731479 Source-Link: https://github.com/googleapis/googleapis/commit/56ffafc26996071e2166fdfec88c325fcb4d8ea4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/954d798ccce0815b347aec2b44f05f86b5535d7d --- .../google/monitoring/dashboard/v1/dashboards_service.proto | 4 ++-- .../src/v1/dashboards_service_client.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index f9746c1b9d3..da18bfb744a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -41,8 +41,8 @@ service DashboardsService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](/monitoring/dashboards/api-dashboard). - // This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](/iam). + // Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). + // This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). rpc CreateDashboard(CreateDashboardRequest) returns (Dashboard) { option (google.api.http) = { post: "/v1/{parent=projects/*}/dashboards" diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index f95627d22dd..0e0398a16c1 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -347,8 +347,8 @@ export class DashboardsServiceClient { > ): void; /** - * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](/monitoring/dashboards/api-dashboard). - * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](/iam). + * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). + * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). * * @param {Object} request * The request object that will be sent. From 14af07d617d435a6c56457a1b6ee3d2413e1ad2f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:10:11 +0000 Subject: [PATCH 133/181] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#199) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../src/v1/dashboards_service_client.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 0e0398a16c1..b23cb088eea 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -49,6 +49,7 @@ const version = require('../../../package.json').version; export class DashboardsServiceClient { 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 DashboardsServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; dashboardsServiceStub?: Promise<{[name: string]: Function}>; @@ -103,6 +105,9 @@ export class DashboardsServiceClient { const staticMembers = this.constructor as typeof DashboardsServiceClient; 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 = @@ -188,6 +193,9 @@ export class DashboardsServiceClient { // 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; } /** @@ -217,7 +225,8 @@ export class DashboardsServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.dashboard.v1 .DashboardsService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 659a5b8bb27ff18a60c5640ea9e02f8a62809073 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:52:50 -0700 Subject: [PATCH 134/181] chore: release 2.4.2 (#200) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index be55612480a..20847217ad5 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.4.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.1...v2.4.2) (2021-07-16) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#199](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/199)) ([273c85d](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/273c85d6d33d54e1ff880dad1127cf4c8f69fbbc)) + ### [2.4.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.0...v2.4.1) (2021-07-12) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index e9b9712079d..47d2a938ca5 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.4.1", + "version": "2.4.2", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index f13d8267d60..6ce31c71c6b 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.4.1" + "@google-cloud/monitoring-dashboards": "^2.4.2" }, "devDependencies": { "c8": "^7.0.0", From c6af2d981f4a7670fa15a1e65c5e8fcce415a1b4 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:53 -0400 Subject: [PATCH 135/181] chore(nodejs): update client ref docs link in metadata (#204) --- packages/google-monitoring-dashboard/.repo-metadata.json | 2 +- packages/google-monitoring-dashboard/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json index 2652bd5029a..8b7cc42c912 100644 --- a/packages/google-monitoring-dashboard/.repo-metadata.json +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -9,6 +9,6 @@ "default_version": "v1", "release_level": "ga", "repo": "googleapis/nodejs-monitoring-dashboards", - "client_documentation": "https://googleapis.dev/nodejs/monitoring-dashboards/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest", "requires_billing": true } diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 04b457290db..9297bab59cb 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -152,7 +152,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/monitoring-dashboards/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest [product-docs]: https://cloud.google.com/monitoring/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 77c0041b6aff3ac41d919e67a7b78645895d6268 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 4 Aug 2021 20:42:45 +0000 Subject: [PATCH 136/181] fix!: Specify a C# namespace option to be consistent with other Cloud APIs (#205) Note: this is only a breaking change for C#, which has not yet published libraries. Committer: jskeet PiperOrigin-RevId: 388718145 Source-Link: https://github.com/googleapis/googleapis/commit/f1d0efe571d5b2d7035f24bc185b33b5e90d791c Source-Link: https://github.com/googleapis/googleapis-gen/commit/150e65f158612dc654c325ffe24eb8efc24e72af --- .../protos/google/monitoring/dashboard/v1/alertchart.proto | 1 + .../protos/google/monitoring/dashboard/v1/common.proto | 1 + .../protos/google/monitoring/dashboard/v1/dashboard.proto | 1 + .../google/monitoring/dashboard/v1/dashboards_service.proto | 1 + .../protos/google/monitoring/dashboard/v1/drilldowns.proto | 1 + .../protos/google/monitoring/dashboard/v1/layouts.proto | 1 + .../protos/google/monitoring/dashboard/v1/metrics.proto | 1 + .../protos/google/monitoring/dashboard/v1/scorecard.proto | 1 + .../protos/google/monitoring/dashboard/v1/service.proto | 1 + .../protos/google/monitoring/dashboard/v1/text.proto | 1 + .../protos/google/monitoring/dashboard/v1/widget.proto | 1 + .../protos/google/monitoring/dashboard/v1/xychart.proto | 1 + packages/google-monitoring-dashboard/protos/protos.json | 1 + 13 files changed, 13 insertions(+) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto index 459e1e639e6..a795e063ab6 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto @@ -19,6 +19,7 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "AlertChartProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 9695d0344aa..804cf138779 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -19,6 +19,7 @@ package google.monitoring.dashboard.v1; import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "CommonProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index d315e3dc633..54c8a013e9a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/layouts.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "DashboardsProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index da18bfb744a..b703a91841c 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -24,6 +24,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "DashboardsServiceProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 3b859e41a45..92c8256c37f 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -18,6 +18,7 @@ package google.monitoring.dashboard.v1; import "google/monitoring/dashboard/v1/common.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "DrilldownsProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index ab5743af5f7..81d6a5bd032 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -18,6 +18,7 @@ package google.monitoring.dashboard.v1; import "google/monitoring/dashboard/v1/widget.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "LayoutsProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index fc2b8069162..dc2bb93dc39 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -19,6 +19,7 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/common.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "MetricsProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index bb18639032f..f7a556fa814 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -21,6 +21,7 @@ import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "ScorecardProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 8fc0fafc2b9..6d5d9a357c4 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 92969c2a86c..2b1ddd3bba7 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "TextProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 795eac8d925..8cf3c3f0c92 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -23,6 +23,7 @@ import "google/monitoring/dashboard/v1/text.proto"; import "google/monitoring/dashboard/v1/xychart.proto"; import "google/protobuf/empty.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "WidgetProto"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index b820efb348a..c29542c27e0 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; option java_outer_classname = "XyChartProto"; diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 6b08991d4d6..afc33dc43bc 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -8,6 +8,7 @@ "nested": { "v1": { "options": { + "csharp_namespace": "Google.Cloud.Monitoring.Dashboard.V1", "go_package": "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard", "java_multiple_files": true, "java_outer_classname": "ServiceMonitoringProto", From 38b83b0a5b9b6b607d65adb055db7e0a75541846 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Aug 2021 22:10:34 +0000 Subject: [PATCH 137/181] chore: release 2.5.0 (#208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.2...v2.5.0) (2021-08-05) ### ⚠ BREAKING CHANGES * Specify a C# namespace option to be consistent with other Cloud APIs (#205) ### Bug Fixes * **build:** c# change is not breaking for Node.js ([#207](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/207)) ([5402d8d](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/5402d8d81c0336544afabbb818f7aa085bfd8917)) * Specify a C# namespace option to be consistent with other Cloud APIs ([#205](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/205)) ([8eee840](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/8eee8403fe71ec18f41cc47afc41620b470d3323)) --- 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-monitoring-dashboard/CHANGELOG.md | 12 ++++++++++++ packages/google-monitoring-dashboard/package.json | 2 +- .../google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 20847217ad5..d54ba565f3d 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.5.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.2...v2.5.0) (2021-08-05) + + +### ⚠ BREAKING CHANGES + +* Specify a C# namespace option to be consistent with other Cloud APIs (#205) + +### Bug Fixes + +* **build:** c# change is not breaking for Node.js ([#207](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/207)) ([5402d8d](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/5402d8d81c0336544afabbb818f7aa085bfd8917)) +* Specify a C# namespace option to be consistent with other Cloud APIs ([#205](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/205)) ([8eee840](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/8eee8403fe71ec18f41cc47afc41620b470d3323)) + ### [2.4.2](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.1...v2.4.2) (2021-07-16) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 47d2a938ca5..6b9ba2e8cbb 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.4.2", + "version": "2.5.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 6ce31c71c6b..bbd39915f29 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.4.2" + "@google-cloud/monitoring-dashboards": "^2.5.0" }, "devDependencies": { "c8": "^7.0.0", From 5e047560cc6d16fd12f7aeb0e1e7dccc0d5efcd7 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:46:26 -0400 Subject: [PATCH 138/181] fix(deps): google-gax v2.24.1 (#210) --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 6b9ba2e8cbb..c28b65337d8 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -27,7 +27,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 2d4aaec01a6b386f6f67eca0807133665126b227 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:18:23 +0000 Subject: [PATCH 139/181] chore: release 2.5.1 (#211) :robot: I have created a release \*beep\* \*boop\* --- ### [2.5.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.0...v2.5.1) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#210](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/210)) ([f9d54b4](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/f9d54b4ed75ee569499553e1e8a2193459c735aa)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index d54ba565f3d..893ea2f751d 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.5.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.0...v2.5.1) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#210](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/210)) ([f9d54b4](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/f9d54b4ed75ee569499553e1e8a2193459c735aa)) + ## [2.5.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.4.2...v2.5.0) (2021-08-05) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index c28b65337d8..ed009f2d436 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.5.0", + "version": "2.5.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index bbd39915f29..74f55fc2c74 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.5.0" + "@google-cloud/monitoring-dashboards": "^2.5.1" }, "devDependencies": { "c8": "^7.0.0", From 199c214b322c0e1f8ece40e59df58c42b2065a79 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:28:17 +0000 Subject: [PATCH 140/181] feat: turns on self-signed JWT feature flag (#212) - [ ] 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/dashboards_service_client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index b23cb088eea..170124b167e 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -132,6 +132,12 @@ export class DashboardsServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; From f8726d3290c99f2bf02aa407dfb47d8125810e31 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:40:14 +0000 Subject: [PATCH 141/181] chore: release 2.6.0 (#213) :robot: I have created a release \*beep\* \*boop\* --- ## [2.6.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.1...v2.6.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#212](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/212)) ([395b00a](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/395b00a9f531432eb38cb7f10967a30ed8b4f66a)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 893ea2f751d..c5dad7ab6b9 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.6.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.1...v2.6.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#212](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/212)) ([395b00a](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/395b00a9f531432eb38cb7f10967a30ed8b4f66a)) + ### [2.5.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.0...v2.5.1) (2021-08-17) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index ed009f2d436..d7848ffc091 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.5.1", + "version": "2.6.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 74f55fc2c74..2c58bd906cd 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.5.1" + "@google-cloud/monitoring-dashboards": "^2.6.0" }, "devDependencies": { "c8": "^7.0.0", From 7e69e993ab1fc4a512e34806a5c80f403eb3ebdf 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:20 +0000 Subject: [PATCH 142/181] chore: disable renovate dependency dashboard (#1194) (#214) --- packages/google-monitoring-dashboard/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 9297bab59cb..3d6a79a4c46 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -143,8 +143,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 813f9a4b050a206553aefdd741e5f99bf26e4c24 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 8 Sep 2021 11:08:15 -0400 Subject: [PATCH 143/181] fix(build): update branch to main (#215) --- packages/google-monitoring-dashboard/README.md | 12 ++++++------ .../google-monitoring-dashboard/samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 3d6a79a4c46..84af3d10443 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/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/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) @@ -15,7 +15,7 @@ interact with dashboards for viewing and analyzing metric data A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/CHANGELOG.md). * [Monitoring Dashboards Node.js Client API Reference][client-docs] * [Monitoring Dashboards Documentation][product-docs] @@ -85,11 +85,11 @@ listDashboards(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards/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-monitoring-dashboards/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-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -138,7 +138,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +150,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest [product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-monitoring-dashboard/samples/README.md b/packages/google-monitoring-dashboard/samples/README.md index 6b12a3e672e..0dbd6b2827a 100644 --- a/packages/google-monitoring-dashboard/samples/README.md +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboards/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 53effa449c1d0dec2c28842aa28a164d3406fa39 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 15:16:18 +0000 Subject: [PATCH 144/181] chore: release 2.6.1 (#216) :robot: I have created a release \*beep\* \*boop\* --- ### [2.6.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.6.0...v2.6.1) (2021-09-08) ### Bug Fixes * **build:** update branch to main ([#215](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/215)) ([9506380](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/950638076cec0320fa886e25b025844f58fce97e)) --- 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-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index c5dad7ab6b9..d027c74f219 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.6.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.6.0...v2.6.1) (2021-09-08) + + +### Bug Fixes + +* **build:** update branch to main ([#215](https://www.github.com/googleapis/nodejs-monitoring-dashboards/issues/215)) ([9506380](https://www.github.com/googleapis/nodejs-monitoring-dashboards/commit/950638076cec0320fa886e25b025844f58fce97e)) + ## [2.6.0](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.5.1...v2.6.0) (2021-08-23) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index d7848ffc091..c7bb4815633 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.6.0", + "version": "2.6.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 2c58bd906cd..5468955fbf9 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.6.0" + "@google-cloud/monitoring-dashboards": "^2.6.1" }, "devDependencies": { "c8": "^7.0.0", From 4c17fbc6210929dde3a79f4474bdded4a424217c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Sep 2021 23:32:35 +0000 Subject: [PATCH 145/181] docs(samples): add auto-generated samples for Node with api short name in region tag (#221) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 399287285 Source-Link: https://github.com/googleapis/googleapis/commit/15759865d1c54e3d46429010f7e472fe6c3d3715 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b27fff623a5d8d586b703b5e4919856abe7c2eb3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI3ZmZmNjIzYTVkOGQ1ODZiNzAzYjVlNDkxOTg1NmFiZTdjMmViMyJ9 --- .../v1/dashboards_service.create_dashboard.js | 65 ++++++++++++++++++ .../v1/dashboards_service.delete_dashboard.js | 54 +++++++++++++++ .../v1/dashboards_service.get_dashboard.js | 56 ++++++++++++++++ .../v1/dashboards_service.list_dashboards.js | 67 +++++++++++++++++++ .../v1/dashboards_service.update_dashboard.js | 58 ++++++++++++++++ .../samples/package.json | 2 +- .../src/v1/dashboards_service_client.ts | 6 +- 7 files changed, 305 insertions(+), 3 deletions(-) create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js new file mode 100644 index 00000000000..4099e623938 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.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(parent, dashboard) { + // [START monitoring_v1_generated_DashboardsService_CreateDashboard_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project on which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. + */ + // const parent = 'abc123' + /** + * Required. The initial dashboard specification. + */ + // const dashboard = '' + /** + * If set, validate the request and preview the review, but do not actually + * save it. + */ + // const validateOnly = true + + // Imports the Dashboard library + const {DashboardsServiceClient} = + require('@google-cloud/monitoring-dashboards').v1; + + // Instantiates a client + const dashboardClient = new DashboardsServiceClient(); + + async function createDashboard() { + // Construct request + const request = { + parent, + dashboard, + }; + + // Run request + const response = await dashboardClient.createDashboard(request); + console.log(response); + } + + createDashboard(); + // [END monitoring_v1_generated_DashboardsService_CreateDashboard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js new file mode 100644 index 00000000000..855c7b5a1eb --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js @@ -0,0 +1,54 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START monitoring_v1_generated_DashboardsService_DeleteDashboard_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Dashboard. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] + */ + // const name = 'abc123' + + // Imports the Dashboard library + const {DashboardsServiceClient} = + require('@google-cloud/monitoring-dashboards').v1; + + // Instantiates a client + const dashboardClient = new DashboardsServiceClient(); + + async function deleteDashboard() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dashboardClient.deleteDashboard(request); + console.log(response); + } + + deleteDashboard(); + // [END monitoring_v1_generated_DashboardsService_DeleteDashboard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js new file mode 100644 index 00000000000..1b9d2536246 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START monitoring_v1_generated_DashboardsService_GetDashboard_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Dashboard. The format is one of: + * - `dashboards/[DASHBOARD_ID]` (for system dashboards) + * - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` + * (for custom dashboards). + */ + // const name = 'abc123' + + // Imports the Dashboard library + const {DashboardsServiceClient} = + require('@google-cloud/monitoring-dashboards').v1; + + // Instantiates a client + const dashboardClient = new DashboardsServiceClient(); + + async function getDashboard() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dashboardClient.getDashboard(request); + console.log(response); + } + + getDashboard(); + // [END monitoring_v1_generated_DashboardsService_GetDashboard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js new file mode 100644 index 00000000000..f47bb407f61 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.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(parent) { + // [START monitoring_v1_generated_DashboardsService_ListDashboards_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The scope of the dashboards to list. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + */ + // const parent = 'abc123' + /** + * A positive number that is the maximum number of results to return. + * If unspecified, a default of 1000 is used. + */ + // const pageSize = 1234 + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + */ + // const pageToken = 'abc123' + + // Imports the Dashboard library + const {DashboardsServiceClient} = + require('@google-cloud/monitoring-dashboards').v1; + + // Instantiates a client + const dashboardClient = new DashboardsServiceClient(); + + async function listDashboards() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dashboardClient.listDashboardsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listDashboards(); + // [END monitoring_v1_generated_DashboardsService_ListDashboards_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js new file mode 100644 index 00000000000..43f4cc96619 --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.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(dashboard) { + // [START monitoring_v1_generated_DashboardsService_UpdateDashboard_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The dashboard that will replace the existing dashboard. + */ + // const dashboard = '' + /** + * If set, validate the request and preview the review, but do not actually + * save it. + */ + // const validateOnly = true + + // Imports the Dashboard library + const {DashboardsServiceClient} = + require('@google-cloud/monitoring-dashboards').v1; + + // Instantiates a client + const dashboardClient = new DashboardsServiceClient(); + + async function updateDashboard() { + // Construct request + const request = { + dashboard, + }; + + // Run request + const response = await dashboardClient.updateDashboard(request); + console.log(response); + } + + updateDashboard(); + // [END monitoring_v1_generated_DashboardsService_UpdateDashboard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 5468955fbf9..0b5742b3b86 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=8" + "node": ">=10" }, "files": [ "*.js" diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 170124b167e..d39343d1aab 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -873,7 +873,8 @@ export class DashboardsServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDashboards']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDashboards.createStream( this.innerApiCalls.listDashboards as gax.GaxCall, @@ -928,7 +929,8 @@ export class DashboardsServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDashboards']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDashboards.asyncIterate( this.innerApiCalls['listDashboards'] as GaxCall, From 4371f374ad9a57abad74956673632f82a2364d21 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:50:19 +0000 Subject: [PATCH 146/181] build(node): update deps used during postprocessing (#1243) (#224) --- .../protos/protos.d.ts | 3 ++- .../google-monitoring-dashboard/protos/protos.js | 7 +++++++ .../protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index c46617baec8..2c1e2fe5cf2 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -3591,7 +3591,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 9ffd1b63928..4dd16baa734 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -8926,6 +8926,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); @@ -8936,6 +8937,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; })(); @@ -17832,6 +17834,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -17936,6 +17939,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-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index afc33dc43bc..3b1a1995ab8 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -906,7 +906,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -1785,6 +1786,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From f1ceb8dfff222de7699f06fe964a485209f90b29 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 06:32:22 -0700 Subject: [PATCH 147/181] chore: fix the wrong post processor image (#226) --- packages/google-monitoring-dashboard/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/.github/.OwlBot.yaml b/packages/google-monitoring-dashboard/.github/.OwlBot.yaml index c6700136f3c..7e59ec3d2b6 100644 --- a/packages/google-monitoring-dashboard/.github/.OwlBot.yaml +++ b/packages/google-monitoring-dashboard/.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 ad2815ce3ebf769ea9e76283bf4af7cade0f83ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 22:34:14 +0200 Subject: [PATCH 148/181] chore(deps): update dependency @types/node to v16 (#225) 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.0.0` -> `^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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index c7bb4815633..69081b6047a 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", "gts": "^2.0.0", From d73ebb6abcf9296a1cd60400f01e160991c9665f Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 15:32:21 -0400 Subject: [PATCH 149/181] chore(cloud-rad): delete api-extractor config (#228) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-monitoring-dashboard/api-extractor.json diff --git a/packages/google-monitoring-dashboard/api-extractor.json b/packages/google-monitoring-dashboard/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-monitoring-dashboard/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 c8083a1aff4cc033a628de47288862a2d2a94315 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:56:16 +0100 Subject: [PATCH 150/181] chore(deps): update dependency sinon to v12 (#227) 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 69081b6047a..6e49ace6dca 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 346a822765c227bf318964469928b6ef274116d7 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:42:28 +0000 Subject: [PATCH 151/181] docs(samples): add example tags to generated samples (#229) - [ ] 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/dashboards_service.create_dashboard.js | 6 +- .../v1/dashboards_service.delete_dashboard.js | 4 +- .../v1/dashboards_service.get_dashboard.js | 4 +- .../v1/dashboards_service.list_dashboards.js | 4 +- .../v1/dashboards_service.update_dashboard.js | 6 +- .../src/v1/dashboards_service_client.ts | 268 +++++++++--------- 7 files changed, 145 insertions(+), 149 deletions(-) diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-monitoring-dashboard/linkinator.config.json +++ b/packages/google-monitoring-dashboard/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js index 4099e623938..418077b457c 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js @@ -28,7 +28,7 @@ function main(parent, dashboard) { /** * Required. The initial dashboard specification. */ - // const dashboard = '' + // const dashboard = {} /** * If set, validate the request and preview the review, but do not actually * save it. @@ -42,7 +42,7 @@ function main(parent, dashboard) { // Instantiates a client const dashboardClient = new DashboardsServiceClient(); - async function createDashboard() { + async function callCreateDashboard() { // Construct request const request = { parent, @@ -54,7 +54,7 @@ function main(parent, dashboard) { console.log(response); } - createDashboard(); + callCreateDashboard(); // [END monitoring_v1_generated_DashboardsService_CreateDashboard_async] } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js index 855c7b5a1eb..b363b758094 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const dashboardClient = new DashboardsServiceClient(); - async function deleteDashboard() { + async function callDeleteDashboard() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteDashboard(); + callDeleteDashboard(); // [END monitoring_v1_generated_DashboardsService_DeleteDashboard_async] } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js index 1b9d2536246..97674ec01fc 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js @@ -34,7 +34,7 @@ function main(name) { // Instantiates a client const dashboardClient = new DashboardsServiceClient(); - async function getDashboard() { + async function callGetDashboard() { // Construct request const request = { name, @@ -45,7 +45,7 @@ function main(name) { console.log(response); } - getDashboard(); + callGetDashboard(); // [END monitoring_v1_generated_DashboardsService_GetDashboard_async] } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js index f47bb407f61..4a09d0ffef5 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js @@ -43,7 +43,7 @@ function main(parent) { // Instantiates a client const dashboardClient = new DashboardsServiceClient(); - async function listDashboards() { + async function callListDashboards() { // Construct request const request = { parent, @@ -56,7 +56,7 @@ function main(parent) { } } - listDashboards(); + callListDashboards(); // [END monitoring_v1_generated_DashboardsService_ListDashboards_async] } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js index 43f4cc96619..b6815da5d08 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js @@ -22,7 +22,7 @@ function main(dashboard) { /** * Required. The dashboard that will replace the existing dashboard. */ - // const dashboard = '' + // const dashboard = {} /** * If set, validate the request and preview the review, but do not actually * save it. @@ -36,7 +36,7 @@ function main(dashboard) { // Instantiates a client const dashboardClient = new DashboardsServiceClient(); - async function updateDashboard() { + async function callUpdateDashboard() { // Construct request const request = { dashboard, @@ -47,7 +47,7 @@ function main(dashboard) { console.log(response); } - updateDashboard(); + callUpdateDashboard(); // [END monitoring_v1_generated_DashboardsService_UpdateDashboard_async] } diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index d39343d1aab..c4c19f69f9f 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -330,6 +330,33 @@ export class DashboardsServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). + * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. + * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard + * Required. The initial dashboard specification. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the review, but do not actually + * save it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * 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/dashboards_service.create_dashboard.js + * region_tag:monitoring_v1_generated_DashboardsService_CreateDashboard_async + */ createDashboard( request?: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, options?: CallOptions @@ -361,33 +388,6 @@ export class DashboardsServiceClient { {} | null | undefined > ): void; - /** - * Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). - * This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project on which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * The `[PROJECT_ID_OR_NUMBER]` must match the dashboard resource name. - * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard - * Required. The initial dashboard specification. - * @param {boolean} request.validateOnly - * If set, validate the request and preview the review, but do not actually - * save it. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * 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.createDashboard(request); - */ createDashboard( request?: protos.google.monitoring.dashboard.v1.ICreateDashboardRequest, optionsOrCallback?: @@ -431,6 +431,31 @@ export class DashboardsServiceClient { this.initialize(); return this.innerApiCalls.createDashboard(request, options, callback); } + /** + * Fetches a specific dashboard. + * + * This method requires the `monitoring.dashboards.get` permission + * on the specified dashboard. For more information, see + * [Cloud Identity and Access Management](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Dashboard. The format is one of: + * + * - `dashboards/[DASHBOARD_ID]` (for system dashboards) + * - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` + * (for custom dashboards). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * 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/dashboards_service.get_dashboard.js + * region_tag:monitoring_v1_generated_DashboardsService_GetDashboard_async + */ getDashboard( request?: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, options?: CallOptions @@ -462,31 +487,6 @@ export class DashboardsServiceClient { {} | null | undefined > ): void; - /** - * Fetches a specific dashboard. - * - * This method requires the `monitoring.dashboards.get` permission - * on the specified dashboard. For more information, see - * [Cloud Identity and Access Management](https://cloud.google.com/iam). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Dashboard. The format is one of: - * - * - `dashboards/[DASHBOARD_ID]` (for system dashboards) - * - `projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID]` - * (for custom dashboards). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * 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.getDashboard(request); - */ getDashboard( request?: protos.google.monitoring.dashboard.v1.IGetDashboardRequest, optionsOrCallback?: @@ -530,6 +530,29 @@ export class DashboardsServiceClient { this.initialize(); return this.innerApiCalls.getDashboard(request, options, callback); } + /** + * Deletes an existing custom dashboard. + * + * This method requires the `monitoring.dashboards.delete` permission + * on the specified dashboard. For more information, see + * [Cloud Identity and Access Management](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Dashboard. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dashboards_service.delete_dashboard.js + * region_tag:monitoring_v1_generated_DashboardsService_DeleteDashboard_async + */ deleteDashboard( request?: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, options?: CallOptions @@ -561,29 +584,6 @@ export class DashboardsServiceClient { {} | null | undefined > ): void; - /** - * Deletes an existing custom dashboard. - * - * This method requires the `monitoring.dashboards.delete` permission - * on the specified dashboard. For more information, see - * [Cloud Identity and Access Management](https://cloud.google.com/iam). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Dashboard. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteDashboard(request); - */ deleteDashboard( request?: protos.google.monitoring.dashboard.v1.IDeleteDashboardRequest, optionsOrCallback?: @@ -627,6 +627,30 @@ export class DashboardsServiceClient { this.initialize(); return this.innerApiCalls.deleteDashboard(request, options, callback); } + /** + * Replaces an existing custom dashboard with a new definition. + * + * This method requires the `monitoring.dashboards.update` permission + * on the specified dashboard. For more information, see + * [Cloud Identity and Access Management](https://cloud.google.com/iam). + * + * @param {Object} request + * The request object that will be sent. + * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard + * Required. The dashboard that will replace the existing dashboard. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the review, but do not actually + * save it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. + * 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/dashboards_service.update_dashboard.js + * region_tag:monitoring_v1_generated_DashboardsService_UpdateDashboard_async + */ updateDashboard( request?: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, options?: CallOptions @@ -658,30 +682,6 @@ export class DashboardsServiceClient { {} | null | undefined > ): void; - /** - * Replaces an existing custom dashboard with a new definition. - * - * This method requires the `monitoring.dashboards.update` permission - * on the specified dashboard. For more information, see - * [Cloud Identity and Access Management](https://cloud.google.com/iam). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.monitoring.dashboard.v1.Dashboard} request.dashboard - * Required. The dashboard that will replace the existing dashboard. - * @param {boolean} request.validateOnly - * If set, validate the request and preview the review, but do not actually - * save it. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Dashboard]{@link google.monitoring.dashboard.v1.Dashboard}. - * 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.updateDashboard(request); - */ updateDashboard( request?: protos.google.monitoring.dashboard.v1.IUpdateDashboardRequest, optionsOrCallback?: @@ -726,37 +726,6 @@ export class DashboardsServiceClient { return this.innerApiCalls.updateDashboard(request, options, callback); } - listDashboards( - request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.monitoring.dashboard.v1.IDashboard[], - protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, - protos.google.monitoring.dashboard.v1.IListDashboardsResponse - ] - >; - listDashboards( - request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - | protos.google.monitoring.dashboard.v1.IListDashboardsResponse - | null - | undefined, - protos.google.monitoring.dashboard.v1.IDashboard - > - ): void; - listDashboards( - request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - callback: PaginationCallback< - protos.google.monitoring.dashboard.v1.IListDashboardsRequest, - | protos.google.monitoring.dashboard.v1.IListDashboardsResponse - | null - | undefined, - protos.google.monitoring.dashboard.v1.IDashboard - > - ): void; /** * Lists the existing dashboards. * @@ -790,6 +759,37 @@ export class DashboardsServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDashboards( + request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.monitoring.dashboard.v1.IDashboard[], + protos.google.monitoring.dashboard.v1.IListDashboardsRequest | null, + protos.google.monitoring.dashboard.v1.IListDashboardsResponse + ] + >; + listDashboards( + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard + > + ): void; + listDashboards( + request: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + callback: PaginationCallback< + protos.google.monitoring.dashboard.v1.IListDashboardsRequest, + | protos.google.monitoring.dashboard.v1.IListDashboardsResponse + | null + | undefined, + protos.google.monitoring.dashboard.v1.IDashboard + > + ): void; listDashboards( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, optionsOrCallback?: @@ -910,11 +910,8 @@ export class DashboardsServiceClient { * 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.listDashboardsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/dashboards_service.list_dashboards.js + * region_tag:monitoring_v1_generated_DashboardsService_ListDashboards_async */ listDashboardsAsync( request?: protos.google.monitoring.dashboard.v1.IListDashboardsRequest, @@ -928,7 +925,6 @@ export class DashboardsServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listDashboards']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From 2725f5b93967cbb158a1b74ec38e79b990b00cde Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:14:21 +0000 Subject: [PATCH 152/181] build: add generated samples to .eslintignore (#230) --- packages/google-monitoring-dashboard/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-monitoring-dashboard/.eslintignore b/packages/google-monitoring-dashboard/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-monitoring-dashboard/.eslintignore +++ b/packages/google-monitoring-dashboard/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 4f685351280f86077aec6da742312091f1a393d3 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 19:54:16 +0000 Subject: [PATCH 153/181] docs(node): support "stable"/"preview" release level (#1312) (#233) --- packages/google-monitoring-dashboard/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 84af3d10443..b5829a4c441 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -132,6 +132,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From b764cc41945a526d3b2a48bef5758f7313db8919 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 15:21:52 -0500 Subject: [PATCH 154/181] chore: add api_shortname and library_type to repo metadata (#232) --- packages/google-monitoring-dashboard/.repo-metadata.json | 6 ++++-- packages/google-monitoring-dashboard/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json index 8b7cc42c912..f6d89e2e015 100644 --- a/packages/google-monitoring-dashboard/.repo-metadata.json +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -7,8 +7,10 @@ "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", "name_pretty": "Monitoring Dashboards", "default_version": "v1", - "release_level": "ga", + "release_level": "stable", "repo": "googleapis/nodejs-monitoring-dashboards", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest", - "requires_billing": true + "requires_billing": true, + "api_shortname": "monitoring", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index b5829a4c441..e9c445430d7 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -4,7 +4,7 @@ # [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) -[![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/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) @@ -122,10 +122,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -133,7 +133,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 5448fe7c744da11ff0070251a5b3fd0d44341bef 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:10:16 +0000 Subject: [PATCH 155/181] docs(badges): tweak badge to use new preview/stable language (#1314) (#235) --- packages/google-monitoring-dashboard/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index e9c445430d7..a551b3637bf 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -4,9 +4,8 @@ # [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) - +[![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/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring-dashboards/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring-dashboards) From b1fc05f92a09c7e23990f37f852fdfec6bc3ec84 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:10:11 +0000 Subject: [PATCH 156/181] test(nodejs): remove 15 add 16 (#1322) (#237) --- packages/google-monitoring-dashboard/protos/protos.d.ts | 2 +- packages/google-monitoring-dashboard/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 2c1e2fe5cf2..b6e4fc837fe 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index 4dd16baa734..e096d38aa95 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/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 3aa418139997f33c5b824ea264776f5bcb942cc2 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:04:16 -0800 Subject: [PATCH 157/181] build: update copyright year to 2022 (#240) 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-monitoring-dashboard/.jsdoc.js | 4 ++-- .../generated/v1/dashboards_service.create_dashboard.js | 4 ++-- .../generated/v1/dashboards_service.delete_dashboard.js | 4 ++-- .../generated/v1/dashboards_service.get_dashboard.js | 4 ++-- .../generated/v1/dashboards_service.list_dashboards.js | 6 +++--- .../generated/v1/dashboards_service.update_dashboard.js | 4 ++-- .../src/v1/dashboards_service_client.ts | 2 +- packages/google-monitoring-dashboard/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-monitoring-dashboard/system-test/install.ts | 2 +- .../test/gapic_dashboards_service_v1.ts | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/google-monitoring-dashboard/.jsdoc.js b/packages/google-monitoring-dashboard/.jsdoc.js index f2eaa28bbbf..babd5974934 100644 --- a/packages/google-monitoring-dashboard/.jsdoc.js +++ b/packages/google-monitoring-dashboard/.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/monitoring-dashboards', diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js index 418077b457c..c294e7ce90f 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, dashboard) { @@ -36,8 +37,7 @@ function main(parent, dashboard) { // const validateOnly = true // Imports the Dashboard library - const {DashboardsServiceClient} = - require('@google-cloud/monitoring-dashboards').v1; + const {DashboardsServiceClient} = require('@google-cloud/monitoring-dashboards').v1; // Instantiates a client const dashboardClient = new DashboardsServiceClient(); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js index b363b758094..24c8560d91d 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -26,8 +27,7 @@ function main(name) { // const name = 'abc123' // Imports the Dashboard library - const {DashboardsServiceClient} = - require('@google-cloud/monitoring-dashboards').v1; + const {DashboardsServiceClient} = require('@google-cloud/monitoring-dashboards').v1; // Instantiates a client const dashboardClient = new DashboardsServiceClient(); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js index 97674ec01fc..6d9416c607b 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -28,8 +29,7 @@ function main(name) { // const name = 'abc123' // Imports the Dashboard library - const {DashboardsServiceClient} = - require('@google-cloud/monitoring-dashboards').v1; + const {DashboardsServiceClient} = require('@google-cloud/monitoring-dashboards').v1; // Instantiates a client const dashboardClient = new DashboardsServiceClient(); diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js index 4a09d0ffef5..e408bc146d7 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -37,8 +38,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Dashboard library - const {DashboardsServiceClient} = - require('@google-cloud/monitoring-dashboards').v1; + const {DashboardsServiceClient} = require('@google-cloud/monitoring-dashboards').v1; // Instantiates a client const dashboardClient = new DashboardsServiceClient(); @@ -52,7 +52,7 @@ function main(parent) { // Run request const iterable = await dashboardClient.listDashboardsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js index b6815da5d08..e04edc0e95f 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(dashboard) { @@ -30,8 +31,7 @@ function main(dashboard) { // const validateOnly = true // Imports the Dashboard library - const {DashboardsServiceClient} = - require('@google-cloud/monitoring-dashboards').v1; + const {DashboardsServiceClient} = require('@google-cloud/monitoring-dashboards').v1; // Instantiates a client const dashboardClient = new DashboardsServiceClient(); diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index c4c19f69f9f..8e68d7b0cc5 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/src/v1/index.ts b/packages/google-monitoring-dashboard/src/v1/index.ts index 73b76335d5f..da11575d59a 100644 --- a/packages/google-monitoring-dashboard/src/v1/index.ts +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/system-test/fixtures/sample/src/index.js b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js index 0279e2f6d0f..7a6f8ae0e47 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.js +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/system-test/fixtures/sample/src/index.ts b/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts index 0ffc44c2bd2..5522c74da56 100644 --- a/packages/google-monitoring-dashboard/system-test/fixtures/sample/src/index.ts +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/system-test/install.ts b/packages/google-monitoring-dashboard/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-monitoring-dashboard/system-test/install.ts +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 837486104bb..1a7941f2b37 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_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 ffbd424aa842d536a1bf5b9457f02c8dffa6f764 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 01:12:15 +0100 Subject: [PATCH 158/181] chore(deps): update dependency gts to v3 (#238) 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 | |---|---|---|---|---|---| | [gts](https://togithub.com/google/gts) | [`^2.0.0` -> `^3.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.2/3.1.0) | [![age](https://badges.renovateapi.com/packages/npm/gts/3.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/gts/3.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/gts/3.1.0/compatibility-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/gts/3.1.0/confidence-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/gts ### [`v3.1.0`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​310-httpswwwgithubcomgooglegtscomparev303v310-2021-01-11) [Compare Source](https://togithub.com/google/gts/compare/v3.0.3...v3.1.0) ##### Features - support comments in JSON ([#​571](https://www.togithub.com/google/gts/issues/571)) ([cb6d2ca](https://www.github.com/google/gts/commit/cb6d2cacb5de7bcc9c8e82dd47e14fc5bf9596a3)) ##### Bug Fixes - **deps:** update dependency eslint-config-prettier to v7 ([#​601](https://www.togithub.com/google/gts/issues/601)) ([6e26681](https://www.github.com/google/gts/commit/6e266812da4b90b18e2abead9b2b5a1ca0c6654b)) - **deps:** upgrade to latest version of meow ([#​616](https://www.togithub.com/google/gts/issues/616)) ([634bad9](https://www.github.com/google/gts/commit/634bad9bbbdb4d397bba101dc38ab14881172a30)) ##### [3.0.3](https://www.github.com/google/gts/compare/v3.0.2...v3.0.3) (2020-12-03) ##### Bug Fixes - **deps:** update dependency execa to v5 ([#​600](https://www.togithub.com/google/gts/issues/600)) ([4e5f1e5](https://www.github.com/google/gts/commit/4e5f1e54facf53588bbb3b025b5240edbd7f3c8a)) - **deps:** update dependency meow to v8 ([#​591](https://www.togithub.com/google/gts/issues/591)) ([c7e223e](https://www.github.com/google/gts/commit/c7e223e6a2ff605fabad2f8359a0385033f8de66)) ##### [3.0.2](https://www.github.com/google/gts/compare/v3.0.1...v3.0.2) (2020-10-26) ##### Bug Fixes - **deps:** loosen ts peer dependency ([#​589](https://www.togithub.com/google/gts/issues/589)) ([8f1d381](https://www.github.com/google/gts/commit/8f1d381d7b166a510c42786c4a337e81b7222c84)) ##### [3.0.1](https://www.github.com/google/gts/compare/v3.0.0...v3.0.1) (2020-10-12) ##### Bug Fixes - **rule:** turn off [@​typescript-eslint/no-var-requires](https://togithub.com/typescript-eslint/no-var-requires) ([#​578](https://www.togithub.com/google/gts/issues/578)) ([3b37229](https://www.github.com/google/gts/commit/3b37229c45969a3c53af123c69bb749578ee6b0b)) ### [`v3.0.3`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​303-httpswwwgithubcomgooglegtscomparev302v303-2020-12-03) [Compare Source](https://togithub.com/google/gts/compare/v3.0.2...v3.0.3) ### [`v3.0.2`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​302-httpswwwgithubcomgooglegtscomparev301v302-2020-10-26) [Compare Source](https://togithub.com/google/gts/compare/v3.0.1...v3.0.2) ### [`v3.0.1`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​301-httpswwwgithubcomgooglegtscomparev300v301-2020-10-12) [Compare Source](https://togithub.com/google/gts/compare/v3.0.0...v3.0.1) ### [`v3.0.0`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​300-httpswwwgithubcomgooglegtscomparev202v300-2020-10-08) [Compare Source](https://togithub.com/google/gts/compare/v2.0.2...v3.0.0) ##### ⚠ BREAKING CHANGES - change default `check` to `lint` ([#​570](https://togithub.com/google/gts/issues/570)) - **deps:** require TypeScript 4.x ([#​565](https://togithub.com/google/gts/issues/565)) ##### Features - Add TypeScript v4 support ([#​551](https://www.togithub.com/google/gts/issues/551)) ([0883956](https://www.github.com/google/gts/commit/08839565a1d2b4b39d532c9b0b596f01b18856fe)) - change default `check` to `lint` ([#​570](https://www.togithub.com/google/gts/issues/570)) ([c527b66](https://www.github.com/google/gts/commit/c527b66be1ef6a78ea14b3d29225a8d7fb7097bd)) - generate .eslintignore when running init ([#​521](https://www.togithub.com/google/gts/issues/521)) ([8bce036](https://www.github.com/google/gts/commit/8bce0368767f0c2ad7d0700deb839962bc928d16)) ##### Bug Fixes - add build/.eslintrc.json to files field ([#​553](https://www.togithub.com/google/gts/issues/553)) ([3b516ad](https://www.github.com/google/gts/commit/3b516ad5e9f0d58201dde469461db7c6ed1c1b78)) - **deps:** require TypeScript 4.x ([#​565](https://www.togithub.com/google/gts/issues/565)) ([cbc5267](https://www.github.com/google/gts/commit/cbc5267579ef24e8c8ceaa2ef794df3ef54ea56a)) - **deps:** update dependency update-notifier to v5 ([#​574](https://www.togithub.com/google/gts/issues/574)) ([9a882bf](https://www.github.com/google/gts/commit/9a882bf4ac30ad06e7b91a65ad5721d8e8b41c4b)) - **deps:** update typescript-eslint monorepo to v2.34.0 ([#​509](https://www.togithub.com/google/gts/issues/509)) ([998a4ac](https://www.github.com/google/gts/commit/998a4ac9b75c97f04d8e5db37563f32d31652f23)) - **deps:** update typescript-eslint monorepo to v3 (major) ([#​528](https://www.togithub.com/google/gts/issues/528)) ([e22e173](https://www.github.com/google/gts/commit/e22e17338db2ddb7eb829c821037c2f4e77ff869)) - **deps:** update typescript-eslint monorepo to v4 ([#​556](https://www.togithub.com/google/gts/issues/556)) ([54148df](https://www.github.com/google/gts/commit/54148dfbd8b5f8b36a0f44f901c5db933393a661)) - better error message for broken tsconfig.json ([#​501](https://www.togithub.com/google/gts/issues/501)) ([0c17a76](https://www.github.com/google/gts/commit/0c17a76c6650eee1d8abaff11a897a432eeaa65f)) - prohibit calls for it.only and describe.only ([#​499](https://www.togithub.com/google/gts/issues/499)) ([071c33c](https://www.github.com/google/gts/commit/071c33ceef0e3765166aaebf6ed4698167ac0f98)) ##### [2.0.2](https://www.github.com/google/gts/compare/v2.0.1...v2.0.2) (2020-05-11) ##### Bug Fixes - Revert 'update dependency eslint to v7'" ([#​507](https://www.togithub.com/google/gts/issues/507)) ([0f9950b](https://www.github.com/google/gts/commit/0f9950b273329dbcce5f3cc20864c3dcd076f08c)) - **deps:** pin release of eslint-typescript ([#​508](https://www.togithub.com/google/gts/issues/508)) ([bd86b42](https://www.github.com/google/gts/commit/bd86b42e2bb904d3765dee82262e4691a11b9958)) - **deps:** update dependency eslint to v7 ([#​504](https://www.togithub.com/google/gts/issues/504)) ([6aee159](https://www.github.com/google/gts/commit/6aee1595d0486ae2c7fd68d16b1b59c4c4015753)) ##### [2.0.1](https://www.github.com/google/gts/compare/v2.0.0...v2.0.1) (2020-05-07) ##### Bug Fixes - throw an error if running with an unsupported version of nodejs ([#​493](https://www.togithub.com/google/gts/issues/493)) ([94fdf1e](https://www.github.com/google/gts/commit/94fdf1eaed634aa73c3e44c7a3d9f1325f773b07)) - **deps:** update dependency meow to v7 ([#​502](https://www.togithub.com/google/gts/issues/502)) ([cf91cda](https://www.github.com/google/gts/commit/cf91cda1afab25759427511d3c97d0037d61c649))
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 6e49ace6dca..a9926930042 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -34,7 +34,7 @@ "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", - "gts": "^2.0.0", + "gts": "^3.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From d8ff14884172bfe9add5e999db8aa7bce4a92254 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:40:36 +0100 Subject: [PATCH 159/181] chore(deps): update dependency sinon to v13 (#244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index a9926930042..d580afbc6d6 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From a8a39841e3bed4dc46c39273598635398fc1bb55 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:06:32 +0000 Subject: [PATCH 160/181] docs(nodejs): version support policy edits (#1346) (#246) --- .../google-monitoring-dashboard/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index a551b3637bf..18cde0497df 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -100,21 +100,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/monitoring-dashboards@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From ecde411ba9a12cd31bd297c286b1870749633005 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:06:52 +0000 Subject: [PATCH 161/181] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#247) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../linkinator.config.json | 10 +- .../v1/dashboards_service.create_dashboard.js | 9 +- .../v1/dashboards_service.delete_dashboard.js | 9 +- .../v1/dashboards_service.get_dashboard.js | 9 +- .../v1/dashboards_service.list_dashboards.js | 9 +- .../v1/dashboards_service.update_dashboard.js | 9 +- ...tadata.google.monitoring.dashboard.v1.json | 235 ++++++++++++++++++ .../src/v1/dashboards_service_client.ts | 5 +- .../test/gapic_dashboards_service_v1.ts | 84 ++++++- 9 files changed, 362 insertions(+), 17 deletions(-) create mode 100644 packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json diff --git a/packages/google-monitoring-dashboard/linkinator.config.json b/packages/google-monitoring-dashboard/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-monitoring-dashboard/linkinator.config.json +++ b/packages/google-monitoring-dashboard/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 } diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js index c294e7ce90f..a57de83932f 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.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-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js index 24c8560d91d..b18a86cd5f9 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.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-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js index 6d9416c607b..9594ed7c9f1 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.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-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js index e408bc146d7..674a79b86d8 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.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-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js index e04edc0e95f..39e61da4ab8 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.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-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json new file mode 100644 index 00000000000..26f912e681b --- /dev/null +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json @@ -0,0 +1,235 @@ +{ + "clientLibrary": { + "name": "nodejs-dashboard", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.monitoring.dashboard.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "monitoring_v1_generated_DashboardsService_CreateDashboard_async", + "title": "DashboardsService createDashboard Sample", + "origin": "API_DEFINITION", + "description": " Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.create_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "dashboard", + "type": ".google.monitoring.dashboard.v1.Dashboard" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "CreateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } + }, + { + "regionTag": "monitoring_v1_generated_DashboardsService_ListDashboards_async", + "title": "DashboardsService listDashboards Sample", + "origin": "API_DEFINITION", + "description": " Lists the existing dashboards. This method requires the `monitoring.dashboards.list` permission on the specified project. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.list_dashboards.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDashboards", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.monitoring.dashboard.v1.ListDashboardsResponse", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "ListDashboards", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } + }, + { + "regionTag": "monitoring_v1_generated_DashboardsService_GetDashboard_async", + "title": "DashboardsService getDashboard Sample", + "origin": "API_DEFINITION", + "description": " Fetches a specific dashboard. This method requires the `monitoring.dashboards.get` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.get_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "GetDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } + }, + { + "regionTag": "monitoring_v1_generated_DashboardsService_DeleteDashboard_async", + "title": "DashboardsService deleteDashboard Sample", + "origin": "API_DEFINITION", + "description": " Deletes an existing custom dashboard. This method requires the `monitoring.dashboards.delete` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.delete_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "DeleteDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } + }, + { + "regionTag": "monitoring_v1_generated_DashboardsService_UpdateDashboard_async", + "title": "DashboardsService updateDashboard Sample", + "origin": "API_DEFINITION", + "description": " Replaces an existing custom dashboard with a new definition. This method requires the `monitoring.dashboards.update` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.update_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", + "async": true, + "parameters": [ + { + "name": "dashboard", + "type": ".google.monitoring.dashboard.v1.Dashboard" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "UpdateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } + } + ] +} diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 8e68d7b0cc5..ec613a1af10 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -1044,9 +1044,8 @@ export class DashboardsServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.dashboardsServiceStub!.then(stub => { + if (this.dashboardsServiceStub && !this._terminated) { + return this.dashboardsServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 1a7941f2b37..4119d470a73 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -153,12 +153,27 @@ describe('v1.DashboardsServiceClient', () => { assert(client.dashboardsServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.dashboardsServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dashboardsServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -304,6 +319,22 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createDashboard with closed client', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDashboard(request), expectedError); + }); }); describe('getDashboard', () => { @@ -415,6 +446,22 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDashboard with closed client', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.GetDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDashboard(request), expectedError); + }); }); describe('deleteDashboard', () => { @@ -526,6 +573,22 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteDashboard with closed client', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDashboard(request), expectedError); + }); }); describe('updateDashboard', () => { @@ -640,6 +703,23 @@ describe('v1.DashboardsServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateDashboard with closed client', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() + ); + request.dashboard = {}; + request.dashboard.name = ''; + const expectedHeaderRequestParams = 'dashboard.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateDashboard(request), expectedError); + }); }); describe('listDashboards', () => { From edf28ae6872205d7c26a9e75dfd4ae17bae5e477 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:34:30 +0000 Subject: [PATCH 162/181] chore: update v2.14.2 gapic-generator-typescript (#251) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_dashboards_service_v1.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 4119d470a73..6bf2167191c 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -330,7 +330,6 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDashboard(request), expectedError); @@ -457,7 +456,6 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDashboard(request), expectedError); @@ -584,7 +582,6 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDashboard(request), expectedError); @@ -715,7 +712,6 @@ describe('v1.DashboardsServiceClient', () => { ); request.dashboard = {}; request.dashboard.name = ''; - const expectedHeaderRequestParams = 'dashboard.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDashboard(request), expectedError); From 07e029cf0da4026bc4e12000c4fa86eb4c62cd23 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 21:26:11 +0000 Subject: [PATCH 163/181] chore: remove unused imports (#252) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 436800465 Source-Link: https://github.com/googleapis/googleapis/commit/d37faaa2fb52303b5d03a7dac750e891e9923a27 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e5ba945b1fb7c2a9ce1cb08d3d73f16645aa3c3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U1YmE5NDViMWZiN2MyYTljZTFjYjA4ZDNkNzNmMTY2NDVhYTNjMyJ9 --- .../monitoring/dashboard/v1/common.proto | 1 - .../dashboard/v1/dashboards_service.proto | 1 - .../monitoring/dashboard/v1/drilldowns.proto | 2 - .../monitoring/dashboard/v1/scorecard.proto | 1 - .../protos/protos.d.ts | 1011 --- .../protos/protos.js | 5764 +++++------------ .../protos/protos.json | 166 - 7 files changed, 1647 insertions(+), 5299 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 804cf138779..2dddf5cd1ff 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; -import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index b703a91841c..21bedfb0121 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -21,7 +21,6 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/dashboard.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 92c8256c37f..24541d3814c 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -16,8 +16,6 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; -import "google/monitoring/dashboard/v1/common.proto"; - option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; option java_multiple_files = true; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index f7a556fa814..ab2adf1135b 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -19,7 +19,6 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/metrics.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index b6e4fc837fe..a3d38e8774f 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -3833,735 +3833,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a Distribution. */ - interface IDistribution { - - /** Distribution count */ - count?: (number|Long|string|null); - - /** Distribution mean */ - mean?: (number|null); - - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); - - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); - - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); - - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); - } - - /** Represents a Distribution. */ - class Distribution implements IDistribution { - - /** - * Constructs a new Distribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDistribution); - - /** Distribution count. */ - public count: (number|Long|string); - - /** Distribution mean. */ - public mean: number; - - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; - - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); - - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; - - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; - - /** - * Creates a new Distribution instance using the specified properties. - * @param [properties] Properties to set - * @returns Distribution instance - */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; - - /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Distribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Distribution - * @throws {Error} If the payload is not 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.Distribution; - - /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Distribution - * @throws {Error} If the payload 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.Distribution; - - /** - * Verifies a Distribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Distribution - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; - - /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Distribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Distribution { - - /** Properties of a Range. */ - interface IRange { - - /** Range min */ - min?: (number|null); - - /** Range max */ - max?: (number|null); - } - - /** Represents a Range. */ - class Range implements IRange { - - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IRange); - - /** Range min. */ - public min: number; - - /** Range max. */ - public max: number; - - /** - * Creates a new Range instance using the specified properties. - * @param [properties] Properties to set - * @returns Range instance - */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; - - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Range message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Range - * @throws {Error} If the payload is not 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.Distribution.Range; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @throws {Error} If the payload 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.Distribution.Range; - - /** - * Verifies a Range message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BucketOptions. */ - interface IBucketOptions { - - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - } - - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { - - /** - * Constructs a new BucketOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IBucketOptions); - - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); - - /** - * Creates a new BucketOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BucketOptions instance - */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; - - /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BucketOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BucketOptions - * @throws {Error} If the payload is not 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.Distribution.BucketOptions; - - /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BucketOptions - * @throws {Error} If the payload 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.Distribution.BucketOptions; - - /** - * Verifies a BucketOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BucketOptions - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; - - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BucketOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace BucketOptions { - - /** Properties of a Linear. */ - interface ILinear { - - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Linear width */ - width?: (number|null); - - /** Linear offset */ - offset?: (number|null); - } - - /** Represents a Linear. */ - class Linear implements ILinear { - - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Linear width. */ - public width: number; - - /** Linear offset. */ - public offset: number; - - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Linear; - - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @throws {Error} If the payload 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.Distribution.BucketOptions.Linear; - - /** - * Verifies a Linear message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; - - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Exponential. */ - interface IExponential { - - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Exponential growthFactor */ - growthFactor?: (number|null); - - /** Exponential scale */ - scale?: (number|null); - } - - /** Represents an Exponential. */ - class Exponential implements IExponential { - - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Exponential growthFactor. */ - public growthFactor: number; - - /** Exponential scale. */ - public scale: number; - - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; - - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Exponential; - - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @throws {Error} If the payload 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.Distribution.BucketOptions.Exponential; - - /** - * Verifies an Exponential message. - * @param message Plain 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 Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; - - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Explicit. */ - interface IExplicit { - - /** Explicit bounds */ - bounds?: (number[]|null); - } - - /** Represents an Explicit. */ - class Explicit implements IExplicit { - - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - - /** Explicit bounds. */ - public bounds: number[]; - - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; - - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @throws {Error} If the payload is not 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.Distribution.BucketOptions.Explicit; - - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @throws {Error} If the payload 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.Distribution.BucketOptions.Explicit; - - /** - * Verifies an Explicit message. - * @param message Plain 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 Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; - - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of an Exemplar. */ - interface IExemplar { - - /** Exemplar value */ - value?: (number|null); - - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); - } - - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { - - /** - * Constructs a new Exemplar. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IExemplar); - - /** Exemplar value. */ - public value: number; - - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; - - /** - * Creates a new Exemplar instance using the specified properties. - * @param [properties] Properties to set - * @returns Exemplar instance - */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; - - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exemplar - * @throws {Error} If the payload is not 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.Distribution.Exemplar; - - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exemplar - * @throws {Error} If the payload 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.Distribution.Exemplar; - - /** - * Verifies an Exemplar message. - * @param message Plain 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 Exemplar message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exemplar - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; - - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Exemplar to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - /** Properties of a Http. */ interface IHttp { @@ -8031,198 +7302,6 @@ export namespace google { } } - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a 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 { @@ -8402,95 +7481,5 @@ 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 }; - } } } diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index e096d38aa95..bd64c4cdf7c 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -9576,32 +9576,26 @@ return ResourceReference; })(); - api.Distribution = (function() { + api.Http = (function() { /** - * Properties of a Distribution. + * Properties of a Http. * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new Distribution. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9609,167 +9603,91 @@ } /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; - - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.sumOfSquaredDeviation = 0; - - /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.range = null; - - /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketOptions = null; - - /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - Distribution.prototype.bucketCounts = $util.emptyArray; + Http.prototype.rules = $util.emptyArray; /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - Distribution.prototype.exemplars = $util.emptyArray; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new Distribution instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.Distribution + * @memberof google.api.Http * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - Distribution.create = function create(properties) { - return new Distribution(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.Distribution + * @memberof google.api.Http * @static - * @param {google.api.IDistribution} message Distribution 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 */ - Distribution.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + 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 Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.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.Distribution + * @memberof google.api.Http * @static - * @param {google.api.IDistribution} message Distribution 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 */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Distribution message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution + * @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.Distribution} Distribution + * @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 */ - Distribution.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.Distribution(); + 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.count = reader.int64(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.mean = reader.double(); - break; - case 3: - message.sumOfSquaredDeviation = reader.double(); - break; - case 4: - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - case 6: - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); - break; - case 10: - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -9780,2103 +9698,361 @@ }; /** - * Decodes a Distribution 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.Distribution + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution + * @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 */ - Distribution.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 Distribution message. + * Verifies a Http message. * @function verify - * @memberof google.api.Distribution + * @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 */ - Distribution.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + 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 "exemplars." + error; + return "rules." + error; } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a Distribution 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.Distribution + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution + * @returns {google.api.Http} Http */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + 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 Distribution 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.Distribution + * @memberof google.api.Http * @static - * @param {google.api.Distribution} message Distribution + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Distribution.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + 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 Distribution to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.Distribution + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - Distribution.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Distribution.Range = (function() { + return Http; + })(); - /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max - */ + api.HttpRule = (function() { - /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set - */ - function Range(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a 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 + */ - /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.min = 0; + /** + * 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]]; + } - /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.max = 0; + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; - /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance - */ - Range.create = function create(properties) { - return new Range(properties); - }; + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); - return writer; - }; + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; - /** - * Decodes a Range message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decode = function 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.Distribution.Range(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min = reader.double(); - break; - case 2: - message.max = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; - /** - * Verifies a Range message. - * @function verify - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Range.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - return null; - }; + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range - */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) - return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - return message; - }; + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Range.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; - } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - return object; - }; + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; - /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.api.Distribution.Range - * @instance - * @returns {Object.} JSON object - */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; - return Range; - })(); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - Distribution.BucketOptions = (function() { + /** + * 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) + }); - /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets - */ + /** + * 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); + }; - /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions - * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - */ - function BucketOptions(properties) { - if (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 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; + }; - /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.linearBuckets = null; + /** + * 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(); + }; - /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.exponentialBuckets = null; - - /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BucketOptions instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance - */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); - }; - - /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BucketOptions message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketOptions.decode = function 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.Distribution.BucketOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); - break; - case 2: - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); - break; - case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BucketOptions message. - * @function verify - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BucketOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; - } - } - return null; - }; - - /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions - */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) - return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); - } - return message; - }; - - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BucketOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; - } - return object; - }; - - /** - * Converts this BucketOptions to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions - * @instance - * @returns {Object.} JSON object - */ - BucketOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - BucketOptions.Linear = (function() { - - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ - - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; - - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; - - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; - - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; - - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function 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.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.width = reader.double(); - break; - case 3: - message.offset = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; - - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; - - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; - - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Linear; - })(); - - BucketOptions.Exponential = (function() { - - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ - - /** - * Constructs a new Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; - - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; - - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; - - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; - - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; - - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function 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.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numFiniteBuckets = reader.int32(); - break; - case 2: - message.growthFactor = reader.double(); - break; - case 3: - message.scale = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; - - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - return message; - }; - - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; - return object; - }; - - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Exponential; - })(); - - BucketOptions.Explicit = (function() { - - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ - - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; - - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; - - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function 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.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; - } - return null; - }; - - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - return message; - }; - - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } - return object; - }; - - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Explicit; - })(); - - return BucketOptions; - })(); - - Distribution.Exemplar = (function() { - - /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments - */ - - /** - * Constructs a new Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar - * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - */ - function Exemplar(properties) { - this.attachments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; - - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; - - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.attachments = $util.emptyArray; - - /** - * Creates a new Exemplar instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance - */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); - }; - - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.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); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decode = function 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.Distribution.Exemplar(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; - case 2: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Exemplar message. - * @function verify - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exemplar.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"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } - } - return null; - }; - - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar - */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) - return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.Exemplar} message Exemplar - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exemplar.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) { - object.value = 0; - object.timestamp = null; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); - } - return object; - }; - - /** - * Converts this Exemplar to JSON. - * @function toJSON - * @memberof google.api.Distribution.Exemplar - * @instance - * @returns {Object.} JSON object - */ - Exemplar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Exemplar; - })(); - - return Distribution; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @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. @@ -18547,332 +16723,79 @@ * @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 + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + EnumValueOptions.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); + 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(); - 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. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @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.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decode = function decode(reader, length) { + 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.ServiceOptions(); + 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 33: + case 1: message.deprecated = reader.bool(); break; case 999: @@ -18880,12 +16803,6 @@ 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; @@ -18895,30 +16812,30 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @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 */ - ServiceOptions.verify = function verify(message) { + EnumValueOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -18933,66 +16850,53 @@ 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. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.ServiceOptions(); + 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.ServiceOptions.uninterpretedOption: array expected"); + 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.ServiceOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.EnumValueOptions.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. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) { + 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) { @@ -19000,51 +16904,45 @@ 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. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + return EnumValueOptions; })(); - protobuf.MethodOptions = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a MethodOptions. + * Properties of a ServiceOptions. * @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 + * @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 MethodOptions. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function MethodOptions(properties) { + function ServiceOptions(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) @@ -19052,133 +16950,117 @@ } /** - * MethodOptions deprecated. + * ServiceOptions 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 + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodOptions.prototype.idempotencyLevel = 0; + ServiceOptions.prototype.deprecated = false; /** - * MethodOptions uninterpretedOption. + * ServiceOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, 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.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + 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 MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @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.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decode = function decode(reader, length) { + 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.MethodOptions(); + 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 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()); + case 1049: + message[".google.api.defaultHost"] = reader.string(); break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 1050: + message[".google.api.oauthScopes"] = reader.string(); break; default: reader.skipType(tag & 7); @@ -19189,44 +17071,35 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.MethodOptions + * @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 */ - MethodOptions.verify = function verify(message) { + 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.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"; @@ -19236,170 +17109,118 @@ 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.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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.MethodOptions(); + var message = new $root.google.protobuf.ServiceOptions(); 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"); + 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.MethodOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ServiceOptions.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.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 MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } if (options.defaults) { object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + 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 MethodOptions to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + ServiceOptions.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; + return ServiceOptions; })(); - protobuf.UninterpretedOption = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an UninterpretedOption. + * Properties of a MethodOptions. * @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 + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** - * Constructs a new UninterpretedOption. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + 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) @@ -19407,156 +17228,133 @@ } /** - * 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 + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + MethodOptions.prototype.deprecated = false; /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MethodOptions.prototype.idempotencyLevel = 0; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + MethodOptions.prototype[".google.api.http"] = null; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions 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); + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @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.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decode = function decode(reader, length) { + 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.UninterpretedOption(); + 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 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(); + case 33: + message.deprecated = reader.bool(); break; - case 5: - message.negativeIntValue = reader.int64(); + case 34: + message.idempotencyLevel = reader.int32(); break; - case 6: - message.doubleValue = reader.double(); + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 7: - message.stringValue = reader.bytes(); + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; - case 8: - message.aggregateValue = reader.string(); + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); break; default: reader.skipType(tag & 7); @@ -19567,422 +17365,217 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @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 */ - UninterpretedOption.verify = function verify(message) { + MethodOptions.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 (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 "name." + error; + return "uninterpretedOption." + 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"; + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.MethodOptions} MethodOptions */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) 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]); - } + 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.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); + 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]); } - 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 (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 (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; + return message; }; /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object + * 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 */ - 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]]; + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; - /** - * 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); - }; + /** + * 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); + }; - return NamePart; + /** + * 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 UninterpretedOption; + return MethodOptions; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @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 SourceCodeInfo. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19990,78 +17583,156 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * 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.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + UninterpretedOption.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(); + 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 SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @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.SourceCodeInfo} SourceCodeInfo + * @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 */ - SourceCodeInfo.decode = function decode(reader, length) { + 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.SourceCodeInfo(); + 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 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + 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); @@ -20072,128 +17743,209 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @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 */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @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 */ - SourceCodeInfo.verify = function verify(message) { + UninterpretedOption.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 (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 "location." + 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 a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) 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]); + 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 a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + UninterpretedOption.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); + 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 SourceCodeInfo to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SourceCodeInfo.Location = (function() { + UninterpretedOption.NamePart = (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 + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension */ /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; + function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20201,338 +17953,212 @@ } /** - * 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 + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - Location.prototype.trailingComments = ""; + NamePart.prototype.namePart = ""; /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + NamePart.prototype.isExtension = false; /** - * Creates a new Location instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ - Location.create = function create(properties) { - return new Location(properties); + NamePart.create = function create(properties) { + return new NamePart(properties); }; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @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 */ - Location.encode = function encode(message, writer) { + NamePart.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]); + 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 Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @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 */ - Location.encodeDelimited = function encodeDelimited(message, writer) { + NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location + * @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.SourceCodeInfo.Location} Location + * @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 */ - Location.decode = function decode(reader, length) { + 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.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()); + 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: - 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()); + 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 Location message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @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 */ - Location.decodeDelimited = function decodeDelimited(reader) { + NamePart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Location message. + * Verifies a NamePart message. * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location + * @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 */ - Location.verify = function verify(message) { + NamePart.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"; - } + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; return null; }; /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) 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]); - } + 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 Location message. Also converts values to other types if specified. + * Creates a plain object from a NamePart message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + NamePart.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]; + 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 Location to JSON. + * Converts this NamePart to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { + NamePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Location; + return NamePart; })(); - return SourceCodeInfo; + return UninterpretedOption; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20540,78 +18166,78 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.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(); + 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 GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decode = function decode(reader, length) { + 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.GeneratedCodeInfo(); + 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.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + 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); @@ -20622,125 +18248,128 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.verify = function verify(message) { + SourceCodeInfo.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 (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 "annotation." + error; + return "location." + error; } } return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) 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]); + 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 GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.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); + 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 GeneratedCodeInfo to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { + SourceCodeInfo.Location = (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 + * 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 Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ - function Annotation(properties) { + 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) @@ -20748,59 +18377,67 @@ } /** - * Annotation path. + * Location path. * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Annotation.prototype.path = $util.emptyArray; + Location.prototype.path = $util.emptyArray; /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Annotation.prototype.sourceFile = ""; + Location.prototype.span = $util.emptyArray; /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Annotation.prototype.begin = 0; + Location.prototype.leadingComments = ""; /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - Annotation.prototype.end = 0; + Location.prototype.trailingComments = ""; /** - * Creates a new Annotation instance using the specified properties. + * 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.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ - Annotation.create = function create(properties) { - return new Annotation(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @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 */ - Annotation.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.path != null && message.path.length) { @@ -20809,43 +18446,50 @@ 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); + 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 Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @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 */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @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.GeneratedCodeInfo.Annotation} Annotation + * @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 */ - Annotation.decode = function decode(reader, length) { + 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.GeneratedCodeInfo.Annotation(); + 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) { @@ -20860,13 +18504,25 @@ message.path.push(reader.int32()); break; case 2: - message.sourceFile = reader.string(); + 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.begin = reader.int32(); + message.leadingComments = reader.string(); break; case 4: - message.end = reader.int32(); + 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); @@ -20877,30 +18533,30 @@ }; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @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 */ - Annotation.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Annotation message. + * Verifies a Location message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @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 */ - Annotation.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.path != null && message.hasOwnProperty("path")) { @@ -20910,116 +18566,149 @@ 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"; + 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 an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + 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.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; + 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 an Annotation message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; + 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.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; + 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 Annotation to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ - Annotation.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Annotation; + return Location; })(); - return GeneratedCodeInfo; + return SourceCodeInfo; })(); - protobuf.Any = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of an Any. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new Any. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function Any(properties) { + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21027,88 +18716,78 @@ } /** - * 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 + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - Any.prototype.value = $util.newBuffer([]); + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new Any instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - Any.create = function create(properties) { - return new Any(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + GeneratedCodeInfo.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); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + 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.Any(); + 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: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); + 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); @@ -21119,329 +18798,383 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + GeneratedCodeInfo.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"; + 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @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.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; + * @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; }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo * @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 + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + 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; }; /** - * 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 + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object */ - 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; + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * 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) + 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; - 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 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); + }; - /** - * 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 Annotation; + })(); - return Timestamp; + return GeneratedCodeInfo; })(); protobuf.Duration = (function() { @@ -21828,209 +19561,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-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 3b1a1995ab8..4cc5154ada8 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -987,139 +987,6 @@ } } }, - "Distribution": { - "fields": { - "count": { - "type": "int64", - "id": 1 - }, - "mean": { - "type": "double", - "id": 2 - }, - "sumOfSquaredDeviation": { - "type": "double", - "id": 3 - }, - "range": { - "type": "Range", - "id": 4 - }, - "bucketOptions": { - "type": "BucketOptions", - "id": 6 - }, - "bucketCounts": { - "rule": "repeated", - "type": "int64", - "id": 7 - }, - "exemplars": { - "rule": "repeated", - "type": "Exemplar", - "id": 10 - } - }, - "nested": { - "Range": { - "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 - } - } - }, - "BucketOptions": { - "oneofs": { - "options": { - "oneof": [ - "linearBuckets", - "exponentialBuckets", - "explicitBuckets" - ] - } - }, - "fields": { - "linearBuckets": { - "type": "Linear", - "id": 1 - }, - "exponentialBuckets": { - "type": "Exponential", - "id": 2 - }, - "explicitBuckets": { - "type": "Explicit", - "id": 3 - } - }, - "nested": { - "Linear": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "width": { - "type": "double", - "id": 2 - }, - "offset": { - "type": "double", - "id": 3 - } - } - }, - "Exponential": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "growthFactor": { - "type": "double", - "id": 2 - }, - "scale": { - "type": "double", - "id": 3 - } - } - }, - "Explicit": { - "fields": { - "bounds": { - "rule": "repeated", - "type": "double", - "id": 1 - } - } - } - } - }, - "Exemplar": { - "fields": { - "value": { - "type": "double", - "id": 1 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "attachments": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -2132,30 +1999,6 @@ } } }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, "Duration": { "fields": { "seconds": { @@ -2170,15 +2013,6 @@ }, "Empty": { "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } } } } From 45747a861682a93508157c268a989e116ba1aaf7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:21:35 -0700 Subject: [PATCH 164/181] feat: Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables (#257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables PiperOrigin-RevId: 440139643 Source-Link: https://github.com/googleapis/googleapis/commit/2bff0f31f05f5d49ef33a11297cf3640c13ec2ac Source-Link: https://github.com/googleapis/googleapis-gen/commit/8c92aa77466a1fe5016e25d806dd4eb45b62e5a2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM5MmFhNzc0NjZhMWZlNTAxNmUyNWQ4MDZkZDRlYjQ1YjYyZTVhMiJ9 * 🦉 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 --- .../monitoring/dashboard/v1/alertchart.proto | 2 +- .../dashboard/v1/collapsible_group.proto | 32 + .../monitoring/dashboard/v1/common.proto | 2 +- .../monitoring/dashboard/v1/dashboard.proto | 9 +- .../dashboard/v1/dashboard_filter.proto | 68 + .../dashboard/v1/dashboards_service.proto | 4 +- .../monitoring/dashboard/v1/drilldowns.proto | 2 +- .../monitoring/dashboard/v1/layouts.proto | 2 +- .../monitoring/dashboard/v1/logs_panel.proto | 38 + .../monitoring/dashboard/v1/metrics.proto | 18 +- .../monitoring/dashboard/v1/scorecard.proto | 2 +- .../monitoring/dashboard/v1/service.proto | 2 +- .../monitoring/dashboard/v1/table.proto | 59 + .../dashboard/v1/table_display_options.proto | 34 + .../google/monitoring/dashboard/v1/text.proto | 2 +- .../monitoring/dashboard/v1/widget.proto | 15 +- .../monitoring/dashboard/v1/xychart.proto | 20 +- .../protos/protos.d.ts | 665 +++++- .../protos/protos.js | 2022 +++++++++++++++-- .../protos/protos.json | 177 +- .../src/v1/dashboards_service_proto_list.json | 5 + 21 files changed, 3036 insertions(+), 144 deletions(-) create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto create mode 100644 packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto index a795e063ab6..2a92423b8f7 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/alertchart.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto new file mode 100644 index 00000000000..513560eb169 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/collapsible_group.proto @@ -0,0 +1,32 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "CollapsibleGroupProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A widget that groups the other widgets. All widgets that are within +// the area spanned by the grouping widget are considered member widgets. +message CollapsibleGroup { + // The collapsed state of the widget on first page load. + bool collapsed = 1; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto index 2dddf5cd1ff..6b8e6b3d549 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto index 54c8a013e9a..66f4c530081 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/monitoring/dashboard/v1/dashboard_filter.proto"; import "google/monitoring/dashboard/v1/layouts.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; @@ -69,4 +70,10 @@ message Dashboard { // arranged vertically. ColumnLayout column_layout = 9; } + + // Filters to reduce the amount of data charted based on the filter criteria. + repeated DashboardFilter dashboard_filters = 11; + + // Labels applied to the dashboard + map labels = 12; } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto new file mode 100644 index 00000000000..fba5cf63e88 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboard_filter.proto @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "DashboardFilterProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A filter to reduce the amount of data charted in relevant widgets. +message DashboardFilter { + // The type for the dashboard filter + enum FilterType { + // Filter type is unspecified. This is not valid in a well-formed request. + FILTER_TYPE_UNSPECIFIED = 0; + + // Filter on a resource label value + RESOURCE_LABEL = 1; + + // Filter on a metrics label value + METRIC_LABEL = 2; + + // Filter on a user metadata label value + USER_METADATA_LABEL = 3; + + // Filter on a system metadata label value + SYSTEM_METADATA_LABEL = 4; + + // Filter on a group id + GROUP = 5; + } + + // Required. The key for the label + string label_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // The placeholder text that can be referenced in a filter string or MQL + // query. If omitted, the dashboard filter will be applied to all relevant + // widgets in the dashboard. + string template_variable = 3; + + // The default value used in the filter comparison + oneof default_value { + // A variable-length string value. + string string_value = 4; + } + + // The specified filter type + FilterType filter_type = 5; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto index 21bedfb0121..4e99c4f7e4d 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/dashboards_service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,11 @@ syntax = "proto3"; package google.monitoring.dashboard.v1; import "google/api/annotations.proto"; +import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/monitoring/dashboard/v1/dashboard.proto"; import "google/protobuf/empty.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto index 24541d3814c..b0a11e0a342 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/drilldowns.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto index 81d6a5bd032..94be37aa519 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/layouts.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto new file mode 100644 index 00000000000..a5fb66c7d6c --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/logs_panel.proto @@ -0,0 +1,38 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "LogsPanelProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A widget that displays a stream of log. +message LogsPanel { + // A filter that chooses which log entries to return. See [Advanced Logs + // Queries](https://cloud.google.com/logging/docs/view/advanced-queries). + // Only log entries that match the filter are returned. An empty filter + // matches all log entries. + string filter = 1; + + // The names of logging resources to collect logs for. Currently only projects + // are supported. If empty, the widget will default to the host project. + repeated string resource_names = 2; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto index dc2bb93dc39..c5ae8f718c2 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -148,6 +148,18 @@ message Threshold { BELOW = 2; } + // An axis identifier. + enum TargetAxis { + // The target axis was not specified. Defaults to Y1. + TARGET_AXIS_UNSPECIFIED = 0; + + // The y_axis (the right axis of chart). + Y1 = 1; + + // The y2_axis (the left axis of chart). + Y2 = 2; + } + // A label for the threshold. string label = 1; @@ -161,6 +173,10 @@ message Threshold { // The direction for the current threshold. Direction is not allowed in a // XyChart. Direction direction = 4; + + // The target axis to use for plotting the threshold. Target axis is not + // allowed in a Scorecard. + TargetAxis target_axis = 5; } // Defines the possible types of spark chart supported by the `Scorecard`. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto index ab2adf1135b..2cb2e4b2eb0 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/scorecard.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto index 6d5d9a357c4..f7e5e44aef1 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto new file mode 100644 index 00000000000..8165c3a9b79 --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table.proto @@ -0,0 +1,59 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; +import "google/monitoring/dashboard/v1/metrics.proto"; +import "google/monitoring/dashboard/v1/table_display_options.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "TableProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// A table that displays time series data. +message TimeSeriesTable { + // Groups a time series query definition with table options. + message TableDataSet { + // Required. Fields for querying time series data from the + // Stackdriver metrics API. + TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A template string for naming `TimeSeries` in the resulting data set. + // This should be a string with interpolations of the form `${label_name}`, + // which will resolve to the label's value i.e. + // "${resource.labels.project_id}." + string table_template = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The lower bound on data point frequency for this data set, implemented by + // specifying the minimum alignment period to use in a time series query + // For example, if the data is published once every 10 minutes, the + // `min_alignment_period` should be at least 10 minutes. It would not + // make sense to fetch and align data at one minute intervals. + google.protobuf.Duration min_alignment_period = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Table display options for configuring how the table is rendered. + TableDisplayOptions table_display_options = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The data displayed in this table. + repeated TableDataSet data_sets = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto new file mode 100644 index 00000000000..b94b20b11bc --- /dev/null +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/table_display_options.proto @@ -0,0 +1,34 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.dashboard.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard"; +option java_multiple_files = true; +option java_outer_classname = "TableDisplayOptionsProto"; +option java_package = "com.google.monitoring.dashboard.v1"; +option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1"; +option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1"; + +// Table display options that can be reused. +message TableDisplayOptions { + // Optional. Columns to display in the table. Leave empty to display all available + // columns. Note: This field is for future features and is not currently used. + repeated string shown_columns = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto index 2b1ddd3bba7..ed75a19f2c6 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/text.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto index 8cf3c3f0c92..bb50eec8ed3 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/widget.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,7 +18,10 @@ package google.monitoring.dashboard.v1; import "google/api/field_behavior.proto"; import "google/monitoring/dashboard/v1/alertchart.proto"; +import "google/monitoring/dashboard/v1/collapsible_group.proto"; +import "google/monitoring/dashboard/v1/logs_panel.proto"; import "google/monitoring/dashboard/v1/scorecard.proto"; +import "google/monitoring/dashboard/v1/table.proto"; import "google/monitoring/dashboard/v1/text.proto"; import "google/monitoring/dashboard/v1/xychart.proto"; import "google/protobuf/empty.proto"; @@ -53,5 +56,15 @@ message Widget { // A chart of alert policy data. AlertChart alert_chart = 7; + + // A widget that displays time series data in a tabular format. + TimeSeriesTable time_series_table = 8; + + // A widget that groups the other widgets. All widgets that are within + // the area spanned by the grouping widget are considered member widgets. + CollapsibleGroup collapsible_group = 9; + + // A widget that shows a stream of logs. + LogsPanel logs_panel = 10; } } diff --git a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto index c29542c27e0..11a26a49c3a 100644 --- a/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto +++ b/packages/google-monitoring-dashboard/protos/google/monitoring/dashboard/v1/xychart.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,6 +59,18 @@ message XyChart { HEATMAP = 4; } + // An axis identifier. + enum TargetAxis { + // The target axis was not specified. Defaults to Y1. + TARGET_AXIS_UNSPECIFIED = 0; + + // The y_axis (the right axis of chart). + Y1 = 1; + + // The y2_axis (the left axis of chart). + Y2 = 2; + } + // Required. Fields for querying time series data from the // Stackdriver metrics API. TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED]; @@ -77,6 +89,9 @@ message XyChart { // `min_alignment_period` should be at least 10 minutes. It would not // make sense to fetch and align data at one minute intervals. google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The target axis to use for plotting the metric. + TargetAxis target_axis = 5 [(google.api.field_behavior) = OPTIONAL]; } // A chart axis. @@ -119,6 +134,9 @@ message XyChart { // The properties applied to the Y axis. Axis y_axis = 7; + // The properties applied to the Y2 axis. + Axis y2_axis = 9; + // Display options for the chart. ChartOptions chart_options = 8; } diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index a3d38e8774f..38361636eff 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/protos/protos.d.ts @@ -116,6 +116,96 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a CollapsibleGroup. */ + interface ICollapsibleGroup { + + /** CollapsibleGroup collapsed */ + collapsed?: (boolean|null); + } + + /** Represents a CollapsibleGroup. */ + class CollapsibleGroup implements ICollapsibleGroup { + + /** + * Constructs a new CollapsibleGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ICollapsibleGroup); + + /** CollapsibleGroup collapsed. */ + public collapsed: boolean; + + /** + * Creates a new CollapsibleGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns CollapsibleGroup instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ICollapsibleGroup): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Encodes the specified CollapsibleGroup message. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @param message CollapsibleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ICollapsibleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CollapsibleGroup message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @param message CollapsibleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ICollapsibleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Verifies a CollapsibleGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CollapsibleGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CollapsibleGroup + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.CollapsibleGroup; + + /** + * Creates a plain object from a CollapsibleGroup message. Also converts values to other types if specified. + * @param message CollapsibleGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.CollapsibleGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CollapsibleGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an Aggregation. */ interface IAggregation { @@ -518,6 +608,12 @@ export namespace google { /** Dashboard columnLayout */ columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + + /** Dashboard dashboardFilters */ + dashboardFilters?: (google.monitoring.dashboard.v1.IDashboardFilter[]|null); + + /** Dashboard labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a Dashboard. */ @@ -550,6 +646,12 @@ export namespace google { /** Dashboard columnLayout. */ public columnLayout?: (google.monitoring.dashboard.v1.IColumnLayout|null); + /** Dashboard dashboardFilters. */ + public dashboardFilters: google.monitoring.dashboard.v1.IDashboardFilter[]; + + /** Dashboard labels. */ + public labels: { [k: string]: string }; + /** Dashboard layout. */ public layout?: ("gridLayout"|"mosaicLayout"|"rowLayout"|"columnLayout"); @@ -624,6 +726,130 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a DashboardFilter. */ + interface IDashboardFilter { + + /** DashboardFilter labelKey */ + labelKey?: (string|null); + + /** DashboardFilter templateVariable */ + templateVariable?: (string|null); + + /** DashboardFilter stringValue */ + stringValue?: (string|null); + + /** DashboardFilter filterType */ + filterType?: (google.monitoring.dashboard.v1.DashboardFilter.FilterType|keyof typeof google.monitoring.dashboard.v1.DashboardFilter.FilterType|null); + } + + /** Represents a DashboardFilter. */ + class DashboardFilter implements IDashboardFilter { + + /** + * Constructs a new DashboardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.IDashboardFilter); + + /** DashboardFilter labelKey. */ + public labelKey: string; + + /** DashboardFilter templateVariable. */ + public templateVariable: string; + + /** DashboardFilter stringValue. */ + public stringValue?: (string|null); + + /** DashboardFilter filterType. */ + public filterType: (google.monitoring.dashboard.v1.DashboardFilter.FilterType|keyof typeof google.monitoring.dashboard.v1.DashboardFilter.FilterType); + + /** DashboardFilter defaultValue. */ + public defaultValue?: "stringValue"; + + /** + * Creates a new DashboardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DashboardFilter instance + */ + public static create(properties?: google.monitoring.dashboard.v1.IDashboardFilter): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Encodes the specified DashboardFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. + * @param message DashboardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.IDashboardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DashboardFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. + * @param message DashboardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.IDashboardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DashboardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DashboardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Decodes a DashboardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DashboardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Verifies a DashboardFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DashboardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DashboardFilter + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.DashboardFilter; + + /** + * Creates a plain object from a DashboardFilter message. Also converts values to other types if specified. + * @param message DashboardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.DashboardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DashboardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DashboardFilter { + + /** FilterType enum. */ + enum FilterType { + FILTER_TYPE_UNSPECIFIED = 0, + RESOURCE_LABEL = 1, + METRIC_LABEL = 2, + USER_METADATA_LABEL = 3, + SYSTEM_METADATA_LABEL = 4, + GROUP = 5 + } + } + /** Properties of a GridLayout. */ interface IGridLayout { @@ -1331,6 +1557,15 @@ export namespace google { /** Widget alertChart */ alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); + + /** Widget timeSeriesTable */ + timeSeriesTable?: (google.monitoring.dashboard.v1.ITimeSeriesTable|null); + + /** Widget collapsibleGroup */ + collapsibleGroup?: (google.monitoring.dashboard.v1.ICollapsibleGroup|null); + + /** Widget logsPanel */ + logsPanel?: (google.monitoring.dashboard.v1.ILogsPanel|null); } /** Represents a Widget. */ @@ -1360,8 +1595,17 @@ export namespace google { /** Widget alertChart. */ public alertChart?: (google.monitoring.dashboard.v1.IAlertChart|null); + /** Widget timeSeriesTable. */ + public timeSeriesTable?: (google.monitoring.dashboard.v1.ITimeSeriesTable|null); + + /** Widget collapsibleGroup. */ + public collapsibleGroup?: (google.monitoring.dashboard.v1.ICollapsibleGroup|null); + + /** Widget logsPanel. */ + public logsPanel?: (google.monitoring.dashboard.v1.ILogsPanel|null); + /** Widget content. */ - public content?: ("xyChart"|"scorecard"|"text"|"blank"|"alertChart"); + public content?: ("xyChart"|"scorecard"|"text"|"blank"|"alertChart"|"timeSeriesTable"|"collapsibleGroup"|"logsPanel"); /** * Creates a new Widget instance using the specified properties. @@ -1434,6 +1678,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a LogsPanel. */ + interface ILogsPanel { + + /** LogsPanel filter */ + filter?: (string|null); + + /** LogsPanel resourceNames */ + resourceNames?: (string[]|null); + } + + /** Represents a LogsPanel. */ + class LogsPanel implements ILogsPanel { + + /** + * Constructs a new LogsPanel. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ILogsPanel); + + /** LogsPanel filter. */ + public filter: string; + + /** LogsPanel resourceNames. */ + public resourceNames: string[]; + + /** + * Creates a new LogsPanel instance using the specified properties. + * @param [properties] Properties to set + * @returns LogsPanel instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ILogsPanel): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Encodes the specified LogsPanel message. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @param message LogsPanel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ILogsPanel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogsPanel message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @param message LogsPanel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ILogsPanel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogsPanel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Decodes a LogsPanel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Verifies a LogsPanel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogsPanel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogsPanel + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.LogsPanel; + + /** + * Creates a plain object from a LogsPanel message. Also converts values to other types if specified. + * @param message LogsPanel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.LogsPanel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogsPanel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Scorecard. */ interface IScorecard { @@ -2198,6 +2538,9 @@ export namespace google { /** Threshold direction */ direction?: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction|null); + + /** Threshold targetAxis */ + targetAxis?: (google.monitoring.dashboard.v1.Threshold.TargetAxis|keyof typeof google.monitoring.dashboard.v1.Threshold.TargetAxis|null); } /** Represents a Threshold. */ @@ -2221,6 +2564,9 @@ export namespace google { /** Threshold direction. */ public direction: (google.monitoring.dashboard.v1.Threshold.Direction|keyof typeof google.monitoring.dashboard.v1.Threshold.Direction); + /** Threshold targetAxis. */ + public targetAxis: (google.monitoring.dashboard.v1.Threshold.TargetAxis|keyof typeof google.monitoring.dashboard.v1.Threshold.TargetAxis); + /** * Creates a new Threshold instance using the specified properties. * @param [properties] Properties to set @@ -2307,6 +2653,13 @@ export namespace google { ABOVE = 1, BELOW = 2 } + + /** TargetAxis enum. */ + enum TargetAxis { + TARGET_AXIS_UNSPECIFIED = 0, + Y1 = 1, + Y2 = 2 + } } /** SparkChartType enum. */ @@ -2316,6 +2669,297 @@ export namespace google { SPARK_BAR = 2 } + /** Properties of a TimeSeriesTable. */ + interface ITimeSeriesTable { + + /** TimeSeriesTable dataSets */ + dataSets?: (google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet[]|null); + } + + /** Represents a TimeSeriesTable. */ + class TimeSeriesTable implements ITimeSeriesTable { + + /** + * Constructs a new TimeSeriesTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITimeSeriesTable); + + /** TimeSeriesTable dataSets. */ + public dataSets: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet[]; + + /** + * Creates a new TimeSeriesTable instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesTable instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITimeSeriesTable): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Encodes the specified TimeSeriesTable message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. + * @param message TimeSeriesTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITimeSeriesTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesTable message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. + * @param message TimeSeriesTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITimeSeriesTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Verifies a TimeSeriesTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesTable + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesTable; + + /** + * Creates a plain object from a TimeSeriesTable message. Also converts values to other types if specified. + * @param message TimeSeriesTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TimeSeriesTable { + + /** Properties of a TableDataSet. */ + interface ITableDataSet { + + /** TableDataSet timeSeriesQuery */ + timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** TableDataSet tableTemplate */ + tableTemplate?: (string|null); + + /** TableDataSet minAlignmentPeriod */ + minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** TableDataSet tableDisplayOptions */ + tableDisplayOptions?: (google.monitoring.dashboard.v1.ITableDisplayOptions|null); + } + + /** Represents a TableDataSet. */ + class TableDataSet implements ITableDataSet { + + /** + * Constructs a new TableDataSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet); + + /** TableDataSet timeSeriesQuery. */ + public timeSeriesQuery?: (google.monitoring.dashboard.v1.ITimeSeriesQuery|null); + + /** TableDataSet tableTemplate. */ + public tableTemplate: string; + + /** TableDataSet minAlignmentPeriod. */ + public minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** TableDataSet tableDisplayOptions. */ + public tableDisplayOptions?: (google.monitoring.dashboard.v1.ITableDisplayOptions|null); + + /** + * Creates a new TableDataSet instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDataSet instance + */ + public static create(properties?: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Encodes the specified TableDataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @param message TableDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @param message TableDataSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDataSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Decodes a TableDataSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Verifies a TableDataSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDataSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDataSet + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet; + + /** + * Creates a plain object from a TableDataSet message. Also converts values to other types if specified. + * @param message TableDataSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDataSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TableDisplayOptions. */ + interface ITableDisplayOptions { + + /** TableDisplayOptions shownColumns */ + shownColumns?: (string[]|null); + } + + /** Represents a TableDisplayOptions. */ + class TableDisplayOptions implements ITableDisplayOptions { + + /** + * Constructs a new TableDisplayOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.dashboard.v1.ITableDisplayOptions); + + /** TableDisplayOptions shownColumns. */ + public shownColumns: string[]; + + /** + * Creates a new TableDisplayOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDisplayOptions instance + */ + public static create(properties?: google.monitoring.dashboard.v1.ITableDisplayOptions): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Encodes the specified TableDisplayOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @param message TableDisplayOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.dashboard.v1.ITableDisplayOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDisplayOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @param message TableDisplayOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.dashboard.v1.ITableDisplayOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Verifies a TableDisplayOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDisplayOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDisplayOptions + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.dashboard.v1.TableDisplayOptions; + + /** + * Creates a plain object from a TableDisplayOptions message. Also converts values to other types if specified. + * @param message TableDisplayOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.dashboard.v1.TableDisplayOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDisplayOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Text. */ interface IText { @@ -2440,6 +3084,9 @@ export namespace google { /** XyChart yAxis */ yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart y2Axis */ + y2Axis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart chartOptions */ chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); } @@ -2468,6 +3115,9 @@ export namespace google { /** XyChart yAxis. */ public yAxis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart y2Axis. */ + public y2Axis?: (google.monitoring.dashboard.v1.XyChart.IAxis|null); + /** XyChart chartOptions. */ public chartOptions?: (google.monitoring.dashboard.v1.IChartOptions|null); @@ -2558,6 +3208,9 @@ export namespace google { /** DataSet minAlignmentPeriod */ minAlignmentPeriod?: (google.protobuf.IDuration|null); + + /** DataSet targetAxis */ + targetAxis?: (google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|null); } /** Represents a DataSet. */ @@ -2581,6 +3234,9 @@ export namespace google { /** DataSet minAlignmentPeriod. */ public minAlignmentPeriod?: (google.protobuf.IDuration|null); + /** DataSet targetAxis. */ + public targetAxis: (google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|keyof typeof google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis); + /** * Creates a new DataSet instance using the specified properties. * @param [properties] Properties to set @@ -2662,6 +3318,13 @@ export namespace google { STACKED_BAR = 3, HEATMAP = 4 } + + /** TargetAxis enum. */ + enum TargetAxis { + TARGET_AXIS_UNSPECIFIED = 0, + Y1 = 1, + Y2 = 2 + } } /** Properties of an Axis. */ diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index bd64c4cdf7c..c2a9f3059b7 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -253,6 +253,193 @@ return AlertChart; })(); + v1.CollapsibleGroup = (function() { + + /** + * Properties of a CollapsibleGroup. + * @memberof google.monitoring.dashboard.v1 + * @interface ICollapsibleGroup + * @property {boolean|null} [collapsed] CollapsibleGroup collapsed + */ + + /** + * Constructs a new CollapsibleGroup. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a CollapsibleGroup. + * @implements ICollapsibleGroup + * @constructor + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup=} [properties] Properties to set + */ + function CollapsibleGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CollapsibleGroup collapsed. + * @member {boolean} collapsed + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @instance + */ + CollapsibleGroup.prototype.collapsed = false; + + /** + * Creates a new CollapsibleGroup instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup instance + */ + CollapsibleGroup.create = function create(properties) { + return new CollapsibleGroup(properties); + }; + + /** + * Encodes the specified CollapsibleGroup message. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup} message CollapsibleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollapsibleGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collapsed != null && Object.hasOwnProperty.call(message, "collapsed")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.collapsed); + return writer; + }; + + /** + * Encodes the specified CollapsibleGroup message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.CollapsibleGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.ICollapsibleGroup} message CollapsibleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollapsibleGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollapsibleGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.CollapsibleGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.collapsed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CollapsibleGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollapsibleGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CollapsibleGroup message. + * @function verify + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CollapsibleGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collapsed != null && message.hasOwnProperty("collapsed")) + if (typeof message.collapsed !== "boolean") + return "collapsed: boolean expected"; + return null; + }; + + /** + * Creates a CollapsibleGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.CollapsibleGroup} CollapsibleGroup + */ + CollapsibleGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.CollapsibleGroup) + return object; + var message = new $root.google.monitoring.dashboard.v1.CollapsibleGroup(); + if (object.collapsed != null) + message.collapsed = Boolean(object.collapsed); + return message; + }; + + /** + * Creates a plain object from a CollapsibleGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {google.monitoring.dashboard.v1.CollapsibleGroup} message CollapsibleGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CollapsibleGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.collapsed = false; + if (message.collapsed != null && message.hasOwnProperty("collapsed")) + object.collapsed = message.collapsed; + return object; + }; + + /** + * Converts this CollapsibleGroup to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @instance + * @returns {Object.} JSON object + */ + CollapsibleGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CollapsibleGroup; + })(); + v1.Aggregation = (function() { /** @@ -1357,6 +1544,8 @@ * @property {google.monitoring.dashboard.v1.IMosaicLayout|null} [mosaicLayout] Dashboard mosaicLayout * @property {google.monitoring.dashboard.v1.IRowLayout|null} [rowLayout] Dashboard rowLayout * @property {google.monitoring.dashboard.v1.IColumnLayout|null} [columnLayout] Dashboard columnLayout + * @property {Array.|null} [dashboardFilters] Dashboard dashboardFilters + * @property {Object.|null} [labels] Dashboard labels */ /** @@ -1368,6 +1557,8 @@ * @param {google.monitoring.dashboard.v1.IDashboard=} [properties] Properties to set */ function Dashboard(properties) { + this.dashboardFilters = []; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1430,6 +1621,22 @@ */ Dashboard.prototype.columnLayout = null; + /** + * Dashboard dashboardFilters. + * @member {Array.} dashboardFilters + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.dashboardFilters = $util.emptyArray; + + /** + * Dashboard labels. + * @member {Object.} labels + * @memberof google.monitoring.dashboard.v1.Dashboard + * @instance + */ + Dashboard.prototype.labels = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1482,6 +1689,12 @@ $root.google.monitoring.dashboard.v1.RowLayout.encode(message.rowLayout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.columnLayout != null && Object.hasOwnProperty.call(message, "columnLayout")) $root.google.monitoring.dashboard.v1.ColumnLayout.encode(message.columnLayout, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dashboardFilters != null && message.dashboardFilters.length) + for (var i = 0; i < message.dashboardFilters.length; ++i) + $root.google.monitoring.dashboard.v1.DashboardFilter.encode(message.dashboardFilters[i], writer.uint32(/* id 11, wireType 2 =*/90).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 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -1512,7 +1725,7 @@ Dashboard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.Dashboard(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1537,6 +1750,33 @@ case 9: message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); break; + case 11: + if (!(message.dashboardFilters && message.dashboardFilters.length)) + message.dashboardFilters = []; + message.dashboardFilters.push($root.google.monitoring.dashboard.v1.DashboardFilter.decode(reader, reader.uint32())); + break; + case 12: + 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; @@ -1620,6 +1860,23 @@ return "columnLayout." + error; } } + if (message.dashboardFilters != null && message.hasOwnProperty("dashboardFilters")) { + if (!Array.isArray(message.dashboardFilters)) + return "dashboardFilters: array expected"; + for (var i = 0; i < message.dashboardFilters.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.DashboardFilter.verify(message.dashboardFilters[i]); + if (error) + return "dashboardFilters." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -1661,6 +1918,23 @@ throw TypeError(".google.monitoring.dashboard.v1.Dashboard.columnLayout: object expected"); message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.fromObject(object.columnLayout); } + if (object.dashboardFilters) { + if (!Array.isArray(object.dashboardFilters)) + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.dashboardFilters: array expected"); + message.dashboardFilters = []; + for (var i = 0; i < object.dashboardFilters.length; ++i) { + if (typeof object.dashboardFilters[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.dashboardFilters: object expected"); + message.dashboardFilters[i] = $root.google.monitoring.dashboard.v1.DashboardFilter.fromObject(object.dashboardFilters[i]); + } + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Dashboard.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; }; @@ -1677,6 +1951,10 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.dashboardFilters = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.displayName = ""; @@ -1708,6 +1986,17 @@ if (options.oneofs) object.layout = "columnLayout"; } + if (message.dashboardFilters && message.dashboardFilters.length) { + object.dashboardFilters = []; + for (var j = 0; j < message.dashboardFilters.length; ++j) + object.dashboardFilters[j] = $root.google.monitoring.dashboard.v1.DashboardFilter.toObject(message.dashboardFilters[j], options); + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -1725,26 +2014,27 @@ return Dashboard; })(); - v1.GridLayout = (function() { + v1.DashboardFilter = (function() { /** - * Properties of a GridLayout. + * Properties of a DashboardFilter. * @memberof google.monitoring.dashboard.v1 - * @interface IGridLayout - * @property {number|Long|null} [columns] GridLayout columns - * @property {Array.|null} [widgets] GridLayout widgets + * @interface IDashboardFilter + * @property {string|null} [labelKey] DashboardFilter labelKey + * @property {string|null} [templateVariable] DashboardFilter templateVariable + * @property {string|null} [stringValue] DashboardFilter stringValue + * @property {google.monitoring.dashboard.v1.DashboardFilter.FilterType|null} [filterType] DashboardFilter filterType */ /** - * Constructs a new GridLayout. + * Constructs a new DashboardFilter. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a GridLayout. - * @implements IGridLayout + * @classdesc Represents a DashboardFilter. + * @implements IDashboardFilter * @constructor - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.IDashboardFilter=} [properties] Properties to set */ - function GridLayout(properties) { - this.widgets = []; + function DashboardFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1752,91 +2042,128 @@ } /** - * GridLayout columns. - * @member {number|Long} columns - * @memberof google.monitoring.dashboard.v1.GridLayout + * DashboardFilter labelKey. + * @member {string} labelKey + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @instance */ - GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DashboardFilter.prototype.labelKey = ""; /** - * GridLayout widgets. - * @member {Array.} widgets - * @memberof google.monitoring.dashboard.v1.GridLayout + * DashboardFilter templateVariable. + * @member {string} templateVariable + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @instance */ - GridLayout.prototype.widgets = $util.emptyArray; + DashboardFilter.prototype.templateVariable = ""; /** - * Creates a new GridLayout instance using the specified properties. + * DashboardFilter stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + DashboardFilter.prototype.stringValue = null; + + /** + * DashboardFilter filterType. + * @member {google.monitoring.dashboard.v1.DashboardFilter.FilterType} filterType + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + DashboardFilter.prototype.filterType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DashboardFilter defaultValue. + * @member {"stringValue"|undefined} defaultValue + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + */ + Object.defineProperty(DashboardFilter.prototype, "defaultValue", { + get: $util.oneOfGetter($oneOfFields = ["stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DashboardFilter instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + * @param {google.monitoring.dashboard.v1.IDashboardFilter=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter instance */ - GridLayout.create = function create(properties) { - return new GridLayout(properties); + DashboardFilter.create = function create(properties) { + return new DashboardFilter(properties); }; /** - * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified DashboardFilter message. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboardFilter} message DashboardFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encode = function encode(message, writer) { + DashboardFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); - if (message.widgets != null && message.widgets.length) - for (var i = 0; i < message.widgets.length; ++i) - $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labelKey != null && Object.hasOwnProperty.call(message, "labelKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.labelKey); + if (message.templateVariable != null && Object.hasOwnProperty.call(message, "templateVariable")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateVariable); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.filterType != null && Object.hasOwnProperty.call(message, "filterType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.filterType); return writer; }; /** - * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * Encodes the specified DashboardFilter message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.DashboardFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static - * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {google.monitoring.dashboard.v1.IDashboardFilter} message DashboardFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + DashboardFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GridLayout message from the specified reader or buffer. + * Decodes a DashboardFilter message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decode = function decode(reader, length) { + DashboardFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.DashboardFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.columns = reader.int64(); + message.labelKey = reader.string(); break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + case 3: + message.templateVariable = reader.string(); + break; + case 4: + message.stringValue = reader.string(); + break; + case 5: + message.filterType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -1847,62 +2174,352 @@ }; /** - * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * Decodes a DashboardFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GridLayout.decodeDelimited = function decodeDelimited(reader) { + DashboardFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GridLayout message. + * Verifies a DashboardFilter message. * @function verify - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GridLayout.verify = function verify(message) { + DashboardFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) - if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) - return "columns: integer|Long expected"; - if (message.widgets != null && message.hasOwnProperty("widgets")) { - if (!Array.isArray(message.widgets)) - return "widgets: array expected"; - for (var i = 0; i < message.widgets.length; ++i) { - var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); - if (error) - return "widgets." + error; - } + var properties = {}; + if (message.labelKey != null && message.hasOwnProperty("labelKey")) + if (!$util.isString(message.labelKey)) + return "labelKey: string expected"; + if (message.templateVariable != null && message.hasOwnProperty("templateVariable")) + if (!$util.isString(message.templateVariable)) + return "templateVariable: string expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.defaultValue = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; } + if (message.filterType != null && message.hasOwnProperty("filterType")) + switch (message.filterType) { + default: + return "filterType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * Creates a DashboardFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.dashboard.v1.GridLayout + * @memberof google.monitoring.dashboard.v1.DashboardFilter * @static * @param {Object.} object Plain object - * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @returns {google.monitoring.dashboard.v1.DashboardFilter} DashboardFilter */ - GridLayout.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + DashboardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.DashboardFilter) return object; - var message = new $root.google.monitoring.dashboard.v1.GridLayout(); - if (object.columns != null) - if ($util.Long) - (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; + var message = new $root.google.monitoring.dashboard.v1.DashboardFilter(); + if (object.labelKey != null) + message.labelKey = String(object.labelKey); + if (object.templateVariable != null) + message.templateVariable = String(object.templateVariable); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + switch (object.filterType) { + case "FILTER_TYPE_UNSPECIFIED": + case 0: + message.filterType = 0; + break; + case "RESOURCE_LABEL": + case 1: + message.filterType = 1; + break; + case "METRIC_LABEL": + case 2: + message.filterType = 2; + break; + case "USER_METADATA_LABEL": + case 3: + message.filterType = 3; + break; + case "SYSTEM_METADATA_LABEL": + case 4: + message.filterType = 4; + break; + case "GROUP": + case 5: + message.filterType = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a DashboardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @static + * @param {google.monitoring.dashboard.v1.DashboardFilter} message DashboardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DashboardFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.labelKey = ""; + object.templateVariable = ""; + object.filterType = options.enums === String ? "FILTER_TYPE_UNSPECIFIED" : 0; + } + if (message.labelKey != null && message.hasOwnProperty("labelKey")) + object.labelKey = message.labelKey; + if (message.templateVariable != null && message.hasOwnProperty("templateVariable")) + object.templateVariable = message.templateVariable; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.defaultValue = "stringValue"; + } + if (message.filterType != null && message.hasOwnProperty("filterType")) + object.filterType = options.enums === String ? $root.google.monitoring.dashboard.v1.DashboardFilter.FilterType[message.filterType] : message.filterType; + return object; + }; + + /** + * Converts this DashboardFilter to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @instance + * @returns {Object.} JSON object + */ + DashboardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * FilterType enum. + * @name google.monitoring.dashboard.v1.DashboardFilter.FilterType + * @enum {number} + * @property {number} FILTER_TYPE_UNSPECIFIED=0 FILTER_TYPE_UNSPECIFIED value + * @property {number} RESOURCE_LABEL=1 RESOURCE_LABEL value + * @property {number} METRIC_LABEL=2 METRIC_LABEL value + * @property {number} USER_METADATA_LABEL=3 USER_METADATA_LABEL value + * @property {number} SYSTEM_METADATA_LABEL=4 SYSTEM_METADATA_LABEL value + * @property {number} GROUP=5 GROUP value + */ + DashboardFilter.FilterType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FILTER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_LABEL"] = 1; + values[valuesById[2] = "METRIC_LABEL"] = 2; + values[valuesById[3] = "USER_METADATA_LABEL"] = 3; + values[valuesById[4] = "SYSTEM_METADATA_LABEL"] = 4; + values[valuesById[5] = "GROUP"] = 5; + return values; + })(); + + return DashboardFilter; + })(); + + v1.GridLayout = (function() { + + /** + * Properties of a GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @interface IGridLayout + * @property {number|Long|null} [columns] GridLayout columns + * @property {Array.|null} [widgets] GridLayout widgets + */ + + /** + * Constructs a new GridLayout. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a GridLayout. + * @implements IGridLayout + * @constructor + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + */ + function GridLayout(properties) { + this.widgets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GridLayout columns. + * @member {number|Long} columns + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.columns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GridLayout widgets. + * @member {Array.} widgets + * @memberof google.monitoring.dashboard.v1.GridLayout + * @instance + */ + GridLayout.prototype.widgets = $util.emptyArray; + + /** + * Creates a new GridLayout instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout instance + */ + GridLayout.create = function create(properties) { + return new GridLayout(properties); + }; + + /** + * Encodes the specified GridLayout message. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && Object.hasOwnProperty.call(message, "columns")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.columns); + if (message.widgets != null && message.widgets.length) + for (var i = 0; i < message.widgets.length; ++i) + $root.google.monitoring.dashboard.v1.Widget.encode(message.widgets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GridLayout message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.GridLayout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {google.monitoring.dashboard.v1.IGridLayout} message GridLayout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GridLayout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.GridLayout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.columns = reader.int64(); + break; + case 2: + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GridLayout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GridLayout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GridLayout message. + * @function verify + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GridLayout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) + if (!$util.isInteger(message.columns) && !(message.columns && $util.isInteger(message.columns.low) && $util.isInteger(message.columns.high))) + return "columns: integer|Long expected"; + if (message.widgets != null && message.hasOwnProperty("widgets")) { + if (!Array.isArray(message.widgets)) + return "widgets: array expected"; + for (var i = 0; i < message.widgets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.Widget.verify(message.widgets[i]); + if (error) + return "widgets." + error; + } + } + return null; + }; + + /** + * Creates a GridLayout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.GridLayout} GridLayout + */ + GridLayout.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.GridLayout) + return object; + var message = new $root.google.monitoring.dashboard.v1.GridLayout(); + if (object.columns != null) + if ($util.Long) + (message.columns = $util.Long.fromValue(object.columns)).unsigned = false; else if (typeof object.columns === "string") message.columns = parseInt(object.columns, 10); else if (typeof object.columns === "number") @@ -3400,6 +4017,9 @@ * @property {google.monitoring.dashboard.v1.IText|null} [text] Widget text * @property {google.protobuf.IEmpty|null} [blank] Widget blank * @property {google.monitoring.dashboard.v1.IAlertChart|null} [alertChart] Widget alertChart + * @property {google.monitoring.dashboard.v1.ITimeSeriesTable|null} [timeSeriesTable] Widget timeSeriesTable + * @property {google.monitoring.dashboard.v1.ICollapsibleGroup|null} [collapsibleGroup] Widget collapsibleGroup + * @property {google.monitoring.dashboard.v1.ILogsPanel|null} [logsPanel] Widget logsPanel */ /** @@ -3465,17 +4085,41 @@ */ Widget.prototype.alertChart = null; + /** + * Widget timeSeriesTable. + * @member {google.monitoring.dashboard.v1.ITimeSeriesTable|null|undefined} timeSeriesTable + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.timeSeriesTable = null; + + /** + * Widget collapsibleGroup. + * @member {google.monitoring.dashboard.v1.ICollapsibleGroup|null|undefined} collapsibleGroup + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.collapsibleGroup = null; + + /** + * Widget logsPanel. + * @member {google.monitoring.dashboard.v1.ILogsPanel|null|undefined} logsPanel + * @memberof google.monitoring.dashboard.v1.Widget + * @instance + */ + Widget.prototype.logsPanel = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Widget content. - * @member {"xyChart"|"scorecard"|"text"|"blank"|"alertChart"|undefined} content + * @member {"xyChart"|"scorecard"|"text"|"blank"|"alertChart"|"timeSeriesTable"|"collapsibleGroup"|"logsPanel"|undefined} content * @memberof google.monitoring.dashboard.v1.Widget * @instance */ Object.defineProperty(Widget.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank", "alertChart"]), + get: $util.oneOfGetter($oneOfFields = ["xyChart", "scorecard", "text", "blank", "alertChart", "timeSeriesTable", "collapsibleGroup", "logsPanel"]), set: $util.oneOfSetter($oneOfFields) }); @@ -3515,6 +4159,12 @@ $root.google.protobuf.Empty.encode(message.blank, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.alertChart != null && Object.hasOwnProperty.call(message, "alertChart")) $root.google.monitoring.dashboard.v1.AlertChart.encode(message.alertChart, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeSeriesTable != null && Object.hasOwnProperty.call(message, "timeSeriesTable")) + $root.google.monitoring.dashboard.v1.TimeSeriesTable.encode(message.timeSeriesTable, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.collapsibleGroup != null && Object.hasOwnProperty.call(message, "collapsibleGroup")) + $root.google.monitoring.dashboard.v1.CollapsibleGroup.encode(message.collapsibleGroup, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.logsPanel != null && Object.hasOwnProperty.call(message, "logsPanel")) + $root.google.monitoring.dashboard.v1.LogsPanel.encode(message.logsPanel, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -3567,6 +4217,15 @@ case 7: message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.decode(reader, reader.uint32()); break; + case 8: + message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.decode(reader, reader.uint32()); + break; + case 9: + message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.decode(reader, reader.uint32()); + break; + case 10: + message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -3654,15 +4313,45 @@ return "alertChart." + error; } } - return null; - }; - - /** - * Creates a Widget message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.dashboard.v1.Widget - * @static - * @param {Object.} object Plain object + if (message.timeSeriesTable != null && message.hasOwnProperty("timeSeriesTable")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesTable.verify(message.timeSeriesTable); + if (error) + return "timeSeriesTable." + error; + } + } + if (message.collapsibleGroup != null && message.hasOwnProperty("collapsibleGroup")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.CollapsibleGroup.verify(message.collapsibleGroup); + if (error) + return "collapsibleGroup." + error; + } + } + if (message.logsPanel != null && message.hasOwnProperty("logsPanel")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.monitoring.dashboard.v1.LogsPanel.verify(message.logsPanel); + if (error) + return "logsPanel." + error; + } + } + return null; + }; + + /** + * Creates a Widget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {Object.} object Plain object * @returns {google.monitoring.dashboard.v1.Widget} Widget */ Widget.fromObject = function fromObject(object) { @@ -3696,6 +4385,21 @@ throw TypeError(".google.monitoring.dashboard.v1.Widget.alertChart: object expected"); message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.fromObject(object.alertChart); } + if (object.timeSeriesTable != null) { + if (typeof object.timeSeriesTable !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.timeSeriesTable: object expected"); + message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.fromObject(object.timeSeriesTable); + } + if (object.collapsibleGroup != null) { + if (typeof object.collapsibleGroup !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.collapsibleGroup: object expected"); + message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.fromObject(object.collapsibleGroup); + } + if (object.logsPanel != null) { + if (typeof object.logsPanel !== "object") + throw TypeError(".google.monitoring.dashboard.v1.Widget.logsPanel: object expected"); + message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.fromObject(object.logsPanel); + } return message; }; @@ -3741,6 +4445,21 @@ if (options.oneofs) object.content = "alertChart"; } + if (message.timeSeriesTable != null && message.hasOwnProperty("timeSeriesTable")) { + object.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.toObject(message.timeSeriesTable, options); + if (options.oneofs) + object.content = "timeSeriesTable"; + } + if (message.collapsibleGroup != null && message.hasOwnProperty("collapsibleGroup")) { + object.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.toObject(message.collapsibleGroup, options); + if (options.oneofs) + object.content = "collapsibleGroup"; + } + if (message.logsPanel != null && message.hasOwnProperty("logsPanel")) { + object.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.toObject(message.logsPanel, options); + if (options.oneofs) + object.content = "logsPanel"; + } return object; }; @@ -3758,6 +4477,232 @@ return Widget; })(); + v1.LogsPanel = (function() { + + /** + * Properties of a LogsPanel. + * @memberof google.monitoring.dashboard.v1 + * @interface ILogsPanel + * @property {string|null} [filter] LogsPanel filter + * @property {Array.|null} [resourceNames] LogsPanel resourceNames + */ + + /** + * Constructs a new LogsPanel. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a LogsPanel. + * @implements ILogsPanel + * @constructor + * @param {google.monitoring.dashboard.v1.ILogsPanel=} [properties] Properties to set + */ + function LogsPanel(properties) { + this.resourceNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LogsPanel filter. + * @member {string} filter + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + */ + LogsPanel.prototype.filter = ""; + + /** + * LogsPanel resourceNames. + * @member {Array.} resourceNames + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + */ + LogsPanel.prototype.resourceNames = $util.emptyArray; + + /** + * Creates a new LogsPanel instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel instance + */ + LogsPanel.create = function create(properties) { + return new LogsPanel(properties); + }; + + /** + * Encodes the specified LogsPanel message. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel} message LogsPanel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsPanel.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.resourceNames != null && message.resourceNames.length) + for (var i = 0; i < message.resourceNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceNames[i]); + return writer; + }; + + /** + * Encodes the specified LogsPanel message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.LogsPanel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.ILogsPanel} message LogsPanel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsPanel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogsPanel message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsPanel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.LogsPanel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 2: + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogsPanel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsPanel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogsPanel message. + * @function verify + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogsPanel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string 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"; + } + return null; + }; + + /** + * Creates a LogsPanel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.LogsPanel} LogsPanel + */ + LogsPanel.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.LogsPanel) + return object; + var message = new $root.google.monitoring.dashboard.v1.LogsPanel(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.resourceNames) { + if (!Array.isArray(object.resourceNames)) + throw TypeError(".google.monitoring.dashboard.v1.LogsPanel.resourceNames: array expected"); + message.resourceNames = []; + for (var i = 0; i < object.resourceNames.length; ++i) + message.resourceNames[i] = String(object.resourceNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a LogsPanel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {google.monitoring.dashboard.v1.LogsPanel} message LogsPanel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogsPanel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceNames = []; + if (options.defaults) + object.filter = ""; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.resourceNames && message.resourceNames.length) { + object.resourceNames = []; + for (var j = 0; j < message.resourceNames.length; ++j) + object.resourceNames[j] = message.resourceNames[j]; + } + return object; + }; + + /** + * Converts this LogsPanel to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @instance + * @returns {Object.} JSON object + */ + LogsPanel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LogsPanel; + })(); + v1.Scorecard = (function() { /** @@ -5690,6 +6635,7 @@ * @property {number|null} [value] Threshold value * @property {google.monitoring.dashboard.v1.Threshold.Color|null} [color] Threshold color * @property {google.monitoring.dashboard.v1.Threshold.Direction|null} [direction] Threshold direction + * @property {google.monitoring.dashboard.v1.Threshold.TargetAxis|null} [targetAxis] Threshold targetAxis */ /** @@ -5739,6 +6685,14 @@ */ Threshold.prototype.direction = 0; + /** + * Threshold targetAxis. + * @member {google.monitoring.dashboard.v1.Threshold.TargetAxis} targetAxis + * @memberof google.monitoring.dashboard.v1.Threshold + * @instance + */ + Threshold.prototype.targetAxis = 0; + /** * Creates a new Threshold instance using the specified properties. * @function create @@ -5771,6 +6725,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.color); if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + if (message.targetAxis != null && Object.hasOwnProperty.call(message, "targetAxis")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.targetAxis); return writer; }; @@ -5817,6 +6773,9 @@ case 4: message.direction = reader.int32(); break; + case 5: + message.targetAxis = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -5876,6 +6835,15 @@ case 2: break; } + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + switch (message.targetAxis) { + default: + return "targetAxis: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -5923,6 +6891,20 @@ message.direction = 2; break; } + switch (object.targetAxis) { + case "TARGET_AXIS_UNSPECIFIED": + case 0: + message.targetAxis = 0; + break; + case "Y1": + case 1: + message.targetAxis = 1; + break; + case "Y2": + case 2: + message.targetAxis = 2; + break; + } return message; }; @@ -5944,6 +6926,7 @@ object.value = 0; object.color = options.enums === String ? "COLOR_UNSPECIFIED" : 0; object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0; + object.targetAxis = options.enums === String ? "TARGET_AXIS_UNSPECIFIED" : 0; } if (message.label != null && message.hasOwnProperty("label")) object.label = message.label; @@ -5953,6 +6936,8 @@ object.color = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Color[message.color] : message.color; if (message.direction != null && message.hasOwnProperty("direction")) object.direction = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.Direction[message.direction] : message.direction; + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + object.targetAxis = options.enums === String ? $root.google.monitoring.dashboard.v1.Threshold.TargetAxis[message.targetAxis] : message.targetAxis; return object; }; @@ -5999,6 +6984,22 @@ return values; })(); + /** + * TargetAxis enum. + * @name google.monitoring.dashboard.v1.Threshold.TargetAxis + * @enum {number} + * @property {number} TARGET_AXIS_UNSPECIFIED=0 TARGET_AXIS_UNSPECIFIED value + * @property {number} Y1=1 Y1 value + * @property {number} Y2=2 Y2 value + */ + Threshold.TargetAxis = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_AXIS_UNSPECIFIED"] = 0; + values[valuesById[1] = "Y1"] = 1; + values[valuesById[2] = "Y2"] = 2; + return values; + })(); + return Threshold; })(); @@ -6018,25 +7019,25 @@ return values; })(); - v1.Text = (function() { + v1.TimeSeriesTable = (function() { /** - * Properties of a Text. + * Properties of a TimeSeriesTable. * @memberof google.monitoring.dashboard.v1 - * @interface IText - * @property {string|null} [content] Text content - * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + * @interface ITimeSeriesTable + * @property {Array.|null} [dataSets] TimeSeriesTable dataSets */ /** - * Constructs a new Text. + * Constructs a new TimeSeriesTable. * @memberof google.monitoring.dashboard.v1 - * @classdesc Represents a Text. - * @implements IText + * @classdesc Represents a TimeSeriesTable. + * @implements ITimeSeriesTable * @constructor - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable=} [properties] Properties to set */ - function Text(properties) { + function TimeSeriesTable(properties) { + this.dataSets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6044,69 +7045,749 @@ } /** - * Text content. - * @member {string} content - * @memberof google.monitoring.dashboard.v1.Text - * @instance - */ - Text.prototype.content = ""; - - /** - * Text format. - * @member {google.monitoring.dashboard.v1.Text.Format} format - * @memberof google.monitoring.dashboard.v1.Text + * TimeSeriesTable dataSets. + * @member {Array.} dataSets + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @instance */ - Text.prototype.format = 0; + TimeSeriesTable.prototype.dataSets = $util.emptyArray; /** - * Creates a new Text instance using the specified properties. + * Creates a new TimeSeriesTable instance using the specified properties. * @function create - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set - * @returns {google.monitoring.dashboard.v1.Text} Text instance + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable instance */ - Text.create = function create(properties) { - return new Text(properties); + TimeSeriesTable.create = function create(properties) { + return new TimeSeriesTable(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified TimeSeriesTable message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. * @function encode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable} message TimeSeriesTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + TimeSeriesTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + if (message.dataSets != null && message.dataSets.length) + for (var i = 0; i < message.dataSets.length; ++i) + $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.encode(message.dataSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * Encodes the specified TimeSeriesTable message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable * @static - * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {google.monitoring.dashboard.v1.ITimeSeriesTable} message TimeSeriesTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a TimeSeriesTable message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.dashboard.v1.Text + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesTable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesTable message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSets != null && message.hasOwnProperty("dataSets")) { + if (!Array.isArray(message.dataSets)) + return "dataSets: array expected"; + for (var i = 0; i < message.dataSets.length; ++i) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify(message.dataSets[i]); + if (error) + return "dataSets." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeriesTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable} TimeSeriesTable + */ + TimeSeriesTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesTable) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable(); + if (object.dataSets) { + if (!Array.isArray(object.dataSets)) + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.dataSets: array expected"); + message.dataSets = []; + for (var i = 0; i < object.dataSets.length; ++i) { + if (typeof object.dataSets[i] !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.dataSets: object expected"); + message.dataSets[i] = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.fromObject(object.dataSets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeriesTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable} message TimeSeriesTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataSets = []; + if (message.dataSets && message.dataSets.length) { + object.dataSets = []; + for (var j = 0; j < message.dataSets.length; ++j) + object.dataSets[j] = $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.toObject(message.dataSets[j], options); + } + return object; + }; + + /** + * Converts this TimeSeriesTable to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TimeSeriesTable.TableDataSet = (function() { + + /** + * Properties of a TableDataSet. + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @interface ITableDataSet + * @property {google.monitoring.dashboard.v1.ITimeSeriesQuery|null} [timeSeriesQuery] TableDataSet timeSeriesQuery + * @property {string|null} [tableTemplate] TableDataSet tableTemplate + * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] TableDataSet minAlignmentPeriod + * @property {google.monitoring.dashboard.v1.ITableDisplayOptions|null} [tableDisplayOptions] TableDataSet tableDisplayOptions + */ + + /** + * Constructs a new TableDataSet. + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @classdesc Represents a TableDataSet. + * @implements ITableDataSet + * @constructor + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet=} [properties] Properties to set + */ + function TableDataSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDataSet timeSeriesQuery. + * @member {google.monitoring.dashboard.v1.ITimeSeriesQuery|null|undefined} timeSeriesQuery + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.timeSeriesQuery = null; + + /** + * TableDataSet tableTemplate. + * @member {string} tableTemplate + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.tableTemplate = ""; + + /** + * TableDataSet minAlignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} minAlignmentPeriod + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.minAlignmentPeriod = null; + + /** + * TableDataSet tableDisplayOptions. + * @member {google.monitoring.dashboard.v1.ITableDisplayOptions|null|undefined} tableDisplayOptions + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + */ + TableDataSet.prototype.tableDisplayOptions = null; + + /** + * Creates a new TableDataSet instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet instance + */ + TableDataSet.create = function create(properties) { + return new TableDataSet(properties); + }; + + /** + * Encodes the specified TableDataSet message. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet} message TableDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesQuery != null && Object.hasOwnProperty.call(message, "timeSeriesQuery")) + $root.google.monitoring.dashboard.v1.TimeSeriesQuery.encode(message.timeSeriesQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tableTemplate != null && Object.hasOwnProperty.call(message, "tableTemplate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableTemplate); + if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) + $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tableDisplayOptions != null && Object.hasOwnProperty.call(message, "tableDisplayOptions")) + $root.google.monitoring.dashboard.v1.TableDisplayOptions.encode(message.tableDisplayOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableDataSet message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.ITableDataSet} message TableDataSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDataSet message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + case 2: + message.tableTemplate = reader.string(); + break; + case 3: + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDataSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDataSet message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDataSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) { + var error = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.verify(message.timeSeriesQuery); + if (error) + return "timeSeriesQuery." + error; + } + if (message.tableTemplate != null && message.hasOwnProperty("tableTemplate")) + if (!$util.isString(message.tableTemplate)) + return "tableTemplate: string expected"; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.minAlignmentPeriod); + if (error) + return "minAlignmentPeriod." + error; + } + if (message.tableDisplayOptions != null && message.hasOwnProperty("tableDisplayOptions")) { + var error = $root.google.monitoring.dashboard.v1.TableDisplayOptions.verify(message.tableDisplayOptions); + if (error) + return "tableDisplayOptions." + error; + } + return null; + }; + + /** + * Creates a TableDataSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} TableDataSet + */ + TableDataSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet) + return object; + var message = new $root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet(); + if (object.timeSeriesQuery != null) { + if (typeof object.timeSeriesQuery !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.timeSeriesQuery: object expected"); + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.fromObject(object.timeSeriesQuery); + } + if (object.tableTemplate != null) + message.tableTemplate = String(object.tableTemplate); + if (object.minAlignmentPeriod != null) { + if (typeof object.minAlignmentPeriod !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.minAlignmentPeriod: object expected"); + message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); + } + if (object.tableDisplayOptions != null) { + if (typeof object.tableDisplayOptions !== "object") + throw TypeError(".google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.tableDisplayOptions: object expected"); + message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.fromObject(object.tableDisplayOptions); + } + return message; + }; + + /** + * Creates a plain object from a TableDataSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet} message TableDataSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDataSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeriesQuery = null; + object.tableTemplate = ""; + object.minAlignmentPeriod = null; + object.tableDisplayOptions = null; + } + if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) + object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); + if (message.tableTemplate != null && message.hasOwnProperty("tableTemplate")) + object.tableTemplate = message.tableTemplate; + if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) + object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + if (message.tableDisplayOptions != null && message.hasOwnProperty("tableDisplayOptions")) + object.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.toObject(message.tableDisplayOptions, options); + return object; + }; + + /** + * Converts this TableDataSet to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @instance + * @returns {Object.} JSON object + */ + TableDataSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableDataSet; + })(); + + return TimeSeriesTable; + })(); + + v1.TableDisplayOptions = (function() { + + /** + * Properties of a TableDisplayOptions. + * @memberof google.monitoring.dashboard.v1 + * @interface ITableDisplayOptions + * @property {Array.|null} [shownColumns] TableDisplayOptions shownColumns + */ + + /** + * Constructs a new TableDisplayOptions. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a TableDisplayOptions. + * @implements ITableDisplayOptions + * @constructor + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions=} [properties] Properties to set + */ + function TableDisplayOptions(properties) { + this.shownColumns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDisplayOptions shownColumns. + * @member {Array.} shownColumns + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @instance + */ + TableDisplayOptions.prototype.shownColumns = $util.emptyArray; + + /** + * Creates a new TableDisplayOptions instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions instance + */ + TableDisplayOptions.create = function create(properties) { + return new TableDisplayOptions(properties); + }; + + /** + * Encodes the specified TableDisplayOptions message. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions} message TableDisplayOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDisplayOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shownColumns != null && message.shownColumns.length) + for (var i = 0; i < message.shownColumns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shownColumns[i]); + return writer; + }; + + /** + * Encodes the specified TableDisplayOptions message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.TableDisplayOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.ITableDisplayOptions} message TableDisplayOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDisplayOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDisplayOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.dashboard.v1.TableDisplayOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.shownColumns && message.shownColumns.length)) + message.shownColumns = []; + message.shownColumns.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDisplayOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDisplayOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDisplayOptions message. + * @function verify + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDisplayOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shownColumns != null && message.hasOwnProperty("shownColumns")) { + if (!Array.isArray(message.shownColumns)) + return "shownColumns: array expected"; + for (var i = 0; i < message.shownColumns.length; ++i) + if (!$util.isString(message.shownColumns[i])) + return "shownColumns: string[] expected"; + } + return null; + }; + + /** + * Creates a TableDisplayOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.dashboard.v1.TableDisplayOptions} TableDisplayOptions + */ + TableDisplayOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.dashboard.v1.TableDisplayOptions) + return object; + var message = new $root.google.monitoring.dashboard.v1.TableDisplayOptions(); + if (object.shownColumns) { + if (!Array.isArray(object.shownColumns)) + throw TypeError(".google.monitoring.dashboard.v1.TableDisplayOptions.shownColumns: array expected"); + message.shownColumns = []; + for (var i = 0; i < object.shownColumns.length; ++i) + message.shownColumns[i] = String(object.shownColumns[i]); + } + return message; + }; + + /** + * Creates a plain object from a TableDisplayOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {google.monitoring.dashboard.v1.TableDisplayOptions} message TableDisplayOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDisplayOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shownColumns = []; + if (message.shownColumns && message.shownColumns.length) { + object.shownColumns = []; + for (var j = 0; j < message.shownColumns.length; ++j) + object.shownColumns[j] = message.shownColumns[j]; + } + return object; + }; + + /** + * Converts this TableDisplayOptions to JSON. + * @function toJSON + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @instance + * @returns {Object.} JSON object + */ + TableDisplayOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableDisplayOptions; + })(); + + v1.Text = (function() { + + /** + * Properties of a Text. + * @memberof google.monitoring.dashboard.v1 + * @interface IText + * @property {string|null} [content] Text content + * @property {google.monitoring.dashboard.v1.Text.Format|null} [format] Text format + */ + + /** + * Constructs a new Text. + * @memberof google.monitoring.dashboard.v1 + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + */ + function Text(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Text content. + * @member {string} content + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.content = ""; + + /** + * Text format. + * @member {google.monitoring.dashboard.v1.Text.Format} format + * @memberof google.monitoring.dashboard.v1.Text + * @instance + */ + Text.prototype.format = 0; + + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText=} [properties] Properties to set + * @returns {google.monitoring.dashboard.v1.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encode + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.monitoring.dashboard.v1.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {google.monitoring.dashboard.v1.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.dashboard.v1.Text * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand @@ -6273,6 +7954,7 @@ * @property {Array.|null} [thresholds] XyChart thresholds * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [xAxis] XyChart xAxis * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [yAxis] XyChart yAxis + * @property {google.monitoring.dashboard.v1.XyChart.IAxis|null} [y2Axis] XyChart y2Axis * @property {google.monitoring.dashboard.v1.IChartOptions|null} [chartOptions] XyChart chartOptions */ @@ -6333,6 +8015,14 @@ */ XyChart.prototype.yAxis = null; + /** + * XyChart y2Axis. + * @member {google.monitoring.dashboard.v1.XyChart.IAxis|null|undefined} y2Axis + * @memberof google.monitoring.dashboard.v1.XyChart + * @instance + */ + XyChart.prototype.y2Axis = null; + /** * XyChart chartOptions. * @member {google.monitoring.dashboard.v1.IChartOptions|null|undefined} chartOptions @@ -6379,6 +8069,8 @@ $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.yAxis, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.chartOptions != null && Object.hasOwnProperty.call(message, "chartOptions")) $root.google.monitoring.dashboard.v1.ChartOptions.encode(message.chartOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.y2Axis != null && Object.hasOwnProperty.call(message, "y2Axis")) + $root.google.monitoring.dashboard.v1.XyChart.Axis.encode(message.y2Axis, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -6432,6 +8124,9 @@ case 7: message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); break; + case 9: + message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; case 8: message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); break; @@ -6503,6 +8198,11 @@ if (error) return "yAxis." + error; } + if (message.y2Axis != null && message.hasOwnProperty("y2Axis")) { + var error = $root.google.monitoring.dashboard.v1.XyChart.Axis.verify(message.y2Axis); + if (error) + return "y2Axis." + error; + } if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) { var error = $root.google.monitoring.dashboard.v1.ChartOptions.verify(message.chartOptions); if (error) @@ -6558,6 +8258,11 @@ throw TypeError(".google.monitoring.dashboard.v1.XyChart.yAxis: object expected"); message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.yAxis); } + if (object.y2Axis != null) { + if (typeof object.y2Axis !== "object") + throw TypeError(".google.monitoring.dashboard.v1.XyChart.y2Axis: object expected"); + message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.fromObject(object.y2Axis); + } if (object.chartOptions != null) { if (typeof object.chartOptions !== "object") throw TypeError(".google.monitoring.dashboard.v1.XyChart.chartOptions: object expected"); @@ -6588,6 +8293,7 @@ object.xAxis = null; object.yAxis = null; object.chartOptions = null; + object.y2Axis = null; } if (message.dataSets && message.dataSets.length) { object.dataSets = []; @@ -6607,6 +8313,8 @@ object.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.yAxis, options); if (message.chartOptions != null && message.hasOwnProperty("chartOptions")) object.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.toObject(message.chartOptions, options); + if (message.y2Axis != null && message.hasOwnProperty("y2Axis")) + object.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.toObject(message.y2Axis, options); return object; }; @@ -6631,6 +8339,7 @@ * @property {google.monitoring.dashboard.v1.XyChart.DataSet.PlotType|null} [plotType] DataSet plotType * @property {string|null} [legendTemplate] DataSet legendTemplate * @property {google.protobuf.IDuration|null} [minAlignmentPeriod] DataSet minAlignmentPeriod + * @property {google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis|null} [targetAxis] DataSet targetAxis */ /** @@ -6680,6 +8389,14 @@ */ DataSet.prototype.minAlignmentPeriod = null; + /** + * DataSet targetAxis. + * @member {google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis} targetAxis + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @instance + */ + DataSet.prototype.targetAxis = 0; + /** * Creates a new DataSet instance using the specified properties. * @function create @@ -6712,6 +8429,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.legendTemplate); if (message.minAlignmentPeriod != null && Object.hasOwnProperty.call(message, "minAlignmentPeriod")) $root.google.protobuf.Duration.encode(message.minAlignmentPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targetAxis != null && Object.hasOwnProperty.call(message, "targetAxis")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.targetAxis); return writer; }; @@ -6758,6 +8477,9 @@ case 4: message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; + case 5: + message.targetAxis = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -6817,6 +8539,15 @@ if (error) return "minAlignmentPeriod." + error; } + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + switch (message.targetAxis) { + default: + return "targetAxis: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -6866,6 +8597,20 @@ throw TypeError(".google.monitoring.dashboard.v1.XyChart.DataSet.minAlignmentPeriod: object expected"); message.minAlignmentPeriod = $root.google.protobuf.Duration.fromObject(object.minAlignmentPeriod); } + switch (object.targetAxis) { + case "TARGET_AXIS_UNSPECIFIED": + case 0: + message.targetAxis = 0; + break; + case "Y1": + case 1: + message.targetAxis = 1; + break; + case "Y2": + case 2: + message.targetAxis = 2; + break; + } return message; }; @@ -6887,6 +8632,7 @@ object.plotType = options.enums === String ? "PLOT_TYPE_UNSPECIFIED" : 0; object.legendTemplate = ""; object.minAlignmentPeriod = null; + object.targetAxis = options.enums === String ? "TARGET_AXIS_UNSPECIFIED" : 0; } if (message.timeSeriesQuery != null && message.hasOwnProperty("timeSeriesQuery")) object.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.toObject(message.timeSeriesQuery, options); @@ -6896,6 +8642,8 @@ object.legendTemplate = message.legendTemplate; if (message.minAlignmentPeriod != null && message.hasOwnProperty("minAlignmentPeriod")) object.minAlignmentPeriod = $root.google.protobuf.Duration.toObject(message.minAlignmentPeriod, options); + if (message.targetAxis != null && message.hasOwnProperty("targetAxis")) + object.targetAxis = options.enums === String ? $root.google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis[message.targetAxis] : message.targetAxis; return object; }; @@ -6930,6 +8678,22 @@ return values; })(); + /** + * TargetAxis enum. + * @name google.monitoring.dashboard.v1.XyChart.DataSet.TargetAxis + * @enum {number} + * @property {number} TARGET_AXIS_UNSPECIFIED=0 TARGET_AXIS_UNSPECIFIED value + * @property {number} Y1=1 Y1 value + * @property {number} Y2=2 Y2 value + */ + DataSet.TargetAxis = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_AXIS_UNSPECIFIED"] = 0; + values[valuesById[1] = "Y1"] = 1; + values[valuesById[2] = "Y2"] = 2; + return values; + })(); + return DataSet; })(); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index 4cc5154ada8..d7b61e3950e 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -32,6 +32,14 @@ } } }, + "CollapsibleGroup": { + "fields": { + "collapsed": { + "type": "bool", + "id": 1 + } + } + }, "Aggregation": { "fields": { "alignmentPeriod": { @@ -200,6 +208,58 @@ "columnLayout": { "type": "ColumnLayout", "id": 9 + }, + "dashboardFilters": { + "rule": "repeated", + "type": "DashboardFilter", + "id": 11 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 12 + } + } + }, + "DashboardFilter": { + "oneofs": { + "defaultValue": { + "oneof": [ + "stringValue" + ] + } + }, + "fields": { + "labelKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "templateVariable": { + "type": "string", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + }, + "filterType": { + "type": "FilterType", + "id": 5 + } + }, + "nested": { + "FilterType": { + "values": { + "FILTER_TYPE_UNSPECIFIED": 0, + "RESOURCE_LABEL": 1, + "METRIC_LABEL": 2, + "USER_METADATA_LABEL": 3, + "SYSTEM_METADATA_LABEL": 4, + "GROUP": 5 + } } } }, @@ -311,7 +371,10 @@ "scorecard", "text", "blank", - "alertChart" + "alertChart", + "timeSeriesTable", + "collapsibleGroup", + "logsPanel" ] } }, @@ -342,6 +405,31 @@ "alertChart": { "type": "AlertChart", "id": 7 + }, + "timeSeriesTable": { + "type": "TimeSeriesTable", + "id": 8 + }, + "collapsibleGroup": { + "type": "CollapsibleGroup", + "id": 9 + }, + "logsPanel": { + "type": "LogsPanel", + "id": 10 + } + } + }, + "LogsPanel": { + "fields": { + "filter": { + "type": "string", + "id": 1 + }, + "resourceNames": { + "rule": "repeated", + "type": "string", + "id": 2 } } }, @@ -542,6 +630,10 @@ "direction": { "type": "Direction", "id": 4 + }, + "targetAxis": { + "type": "TargetAxis", + "id": 5 } }, "nested": { @@ -558,6 +650,13 @@ "ABOVE": 1, "BELOW": 2 } + }, + "TargetAxis": { + "values": { + "TARGET_AXIS_UNSPECIFIED": 0, + "Y1": 1, + "Y2": 2 + } } } }, @@ -568,6 +667,64 @@ "SPARK_BAR": 2 } }, + "TimeSeriesTable": { + "fields": { + "dataSets": { + "rule": "repeated", + "type": "TableDataSet", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "TableDataSet": { + "fields": { + "timeSeriesQuery": { + "type": "TimeSeriesQuery", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableTemplate": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minAlignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tableDisplayOptions": { + "type": "TableDisplayOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "TableDisplayOptions": { + "fields": { + "shownColumns": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "Text": { "fields": { "content": { @@ -616,6 +773,10 @@ "type": "Axis", "id": 7 }, + "y2Axis": { + "type": "Axis", + "id": 9 + }, "chartOptions": { "type": "ChartOptions", "id": 8 @@ -645,6 +806,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "targetAxis": { + "type": "TargetAxis", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -656,6 +824,13 @@ "STACKED_BAR": 3, "HEATMAP": 4 } + }, + "TargetAxis": { + "values": { + "TARGET_AXIS_UNSPECIFIED": 0, + "Y1": 1, + "Y2": 2 + } } } }, diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json index 18264f8d673..c084fbb63f9 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_proto_list.json @@ -1,13 +1,18 @@ [ "../../protos/google/monitoring/dashboard/v1/alertchart.proto", + "../../protos/google/monitoring/dashboard/v1/collapsible_group.proto", "../../protos/google/monitoring/dashboard/v1/common.proto", "../../protos/google/monitoring/dashboard/v1/dashboard.proto", + "../../protos/google/monitoring/dashboard/v1/dashboard_filter.proto", "../../protos/google/monitoring/dashboard/v1/dashboards_service.proto", "../../protos/google/monitoring/dashboard/v1/drilldowns.proto", "../../protos/google/monitoring/dashboard/v1/layouts.proto", + "../../protos/google/monitoring/dashboard/v1/logs_panel.proto", "../../protos/google/monitoring/dashboard/v1/metrics.proto", "../../protos/google/monitoring/dashboard/v1/scorecard.proto", "../../protos/google/monitoring/dashboard/v1/service.proto", + "../../protos/google/monitoring/dashboard/v1/table.proto", + "../../protos/google/monitoring/dashboard/v1/table_display_options.proto", "../../protos/google/monitoring/dashboard/v1/text.proto", "../../protos/google/monitoring/dashboard/v1/widget.proto", "../../protos/google/monitoring/dashboard/v1/xychart.proto" From 7cce11bd78f686a94dc6ff7c86c5e78466c12c6e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 16:40:50 -0400 Subject: [PATCH 165/181] chore(main): release 2.7.0 (#258) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-monitoring-dashboard/CHANGELOG.md | 7 +++++++ packages/google-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index d027c74f219..30f32d04680 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.7.0](https://github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.6.1...v2.7.0) (2022-04-08) + + +### Features + +* Sync public protos with latests public api state. This adds support for collapsible groups, filters, labels, drilldowns, logs panels and tables ([#257](https://github.com/googleapis/nodejs-monitoring-dashboards/issues/257)) ([5f539c1](https://github.com/googleapis/nodejs-monitoring-dashboards/commit/5f539c1957a448bf475e568f2b4fe76fa5d4c3a8)) + ### [2.6.1](https://www.github.com/googleapis/nodejs-monitoring-dashboards/compare/v2.6.0...v2.6.1) (2021-09-08) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index d580afbc6d6..b69bef161a1 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "2.6.1", + "version": "2.7.0", "description": "interact with dashboards for viewing and analyzing metric data", "repository": "googleapis/nodejs-monitoring-dashboards", "license": "Apache-2.0", diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 0b5742b3b86..5838bed60cb 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^2.6.1" + "@google-cloud/monitoring-dashboards": "^2.7.0" }, "devDependencies": { "c8": "^7.0.0", From b6888e14fdf6fe1c050889886b0a63452808f0cc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 18:16:12 +0000 Subject: [PATCH 166/181] build(node): update client library version in samples metadata (#1356) (#262) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- ...tadata.google.monitoring.dashboard.v1.json | 448 +++++++++--------- 1 file changed, 224 insertions(+), 224 deletions(-) diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json index 26f912e681b..67d47f2dfb4 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json @@ -1,235 +1,235 @@ { - "clientLibrary": { - "name": "nodejs-dashboard", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.monitoring.dashboard.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "monitoring_v1_generated_DashboardsService_CreateDashboard_async", - "title": "DashboardsService createDashboard Sample", - "origin": "API_DEFINITION", - "description": " Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", - "canonical": true, - "file": "dashboards_service.create_dashboard.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "dashboard", - "type": ".google.monitoring.dashboard.v1.Dashboard" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.monitoring.dashboard.v1.Dashboard", - "client": { - "shortName": "DashboardsServiceClient", - "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" - }, - "method": { - "shortName": "CreateDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", - "service": { - "shortName": "DashboardsService", - "fullName": "google.monitoring.dashboard.v1.DashboardsService" - } - } - } + "clientLibrary": { + "name": "nodejs-dashboard", + "version": "2.7.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.monitoring.dashboard.v1", + "version": "v1" + } + ] }, - { - "regionTag": "monitoring_v1_generated_DashboardsService_ListDashboards_async", - "title": "DashboardsService listDashboards Sample", - "origin": "API_DEFINITION", - "description": " Lists the existing dashboards. This method requires the `monitoring.dashboards.list` permission on the specified project. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", - "canonical": true, - "file": "dashboards_service.list_dashboards.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDashboards", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.monitoring.dashboard.v1.ListDashboardsResponse", - "client": { - "shortName": "DashboardsServiceClient", - "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + "regionTag": "monitoring_v1_generated_DashboardsService_CreateDashboard_async", + "title": "DashboardsService createDashboard Sample", + "origin": "API_DEFINITION", + "description": " Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see [Managing dashboards by API](https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the `monitoring.dashboards.create` permission on the specified project. For more information about permissions, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.create_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "dashboard", + "type": ".google.monitoring.dashboard.v1.Dashboard" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "CreateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.CreateDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } }, - "method": { - "shortName": "ListDashboards", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", - "service": { - "shortName": "DashboardsService", - "fullName": "google.monitoring.dashboard.v1.DashboardsService" - } - } - } - }, - { - "regionTag": "monitoring_v1_generated_DashboardsService_GetDashboard_async", - "title": "DashboardsService getDashboard Sample", - "origin": "API_DEFINITION", - "description": " Fetches a specific dashboard. This method requires the `monitoring.dashboards.get` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", - "canonical": true, - "file": "dashboards_service.get_dashboard.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.monitoring.dashboard.v1.Dashboard", - "client": { - "shortName": "DashboardsServiceClient", - "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + "regionTag": "monitoring_v1_generated_DashboardsService_ListDashboards_async", + "title": "DashboardsService listDashboards Sample", + "origin": "API_DEFINITION", + "description": " Lists the existing dashboards. This method requires the `monitoring.dashboards.list` permission on the specified project. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.list_dashboards.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDashboards", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.monitoring.dashboard.v1.ListDashboardsResponse", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "ListDashboards", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.ListDashboards", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } }, - "method": { - "shortName": "GetDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", - "service": { - "shortName": "DashboardsService", - "fullName": "google.monitoring.dashboard.v1.DashboardsService" - } - } - } - }, - { - "regionTag": "monitoring_v1_generated_DashboardsService_DeleteDashboard_async", - "title": "DashboardsService deleteDashboard Sample", - "origin": "API_DEFINITION", - "description": " Deletes an existing custom dashboard. This method requires the `monitoring.dashboards.delete` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", - "canonical": true, - "file": "dashboards_service.delete_dashboard.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DashboardsServiceClient", - "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + "regionTag": "monitoring_v1_generated_DashboardsService_GetDashboard_async", + "title": "DashboardsService getDashboard Sample", + "origin": "API_DEFINITION", + "description": " Fetches a specific dashboard. This method requires the `monitoring.dashboards.get` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.get_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "GetDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.GetDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } }, - "method": { - "shortName": "DeleteDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", - "service": { - "shortName": "DashboardsService", - "fullName": "google.monitoring.dashboard.v1.DashboardsService" - } - } - } - }, - { - "regionTag": "monitoring_v1_generated_DashboardsService_UpdateDashboard_async", - "title": "DashboardsService updateDashboard Sample", - "origin": "API_DEFINITION", - "description": " Replaces an existing custom dashboard with a new definition. This method requires the `monitoring.dashboards.update` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", - "canonical": true, - "file": "dashboards_service.update_dashboard.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", - "async": true, - "parameters": [ - { - "name": "dashboard", - "type": ".google.monitoring.dashboard.v1.Dashboard" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.monitoring.dashboard.v1.Dashboard", - "client": { - "shortName": "DashboardsServiceClient", - "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + "regionTag": "monitoring_v1_generated_DashboardsService_DeleteDashboard_async", + "title": "DashboardsService deleteDashboard Sample", + "origin": "API_DEFINITION", + "description": " Deletes an existing custom dashboard. This method requires the `monitoring.dashboards.delete` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.delete_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "DeleteDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.DeleteDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } }, - "method": { - "shortName": "UpdateDashboard", - "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", - "service": { - "shortName": "DashboardsService", - "fullName": "google.monitoring.dashboard.v1.DashboardsService" - } + { + "regionTag": "monitoring_v1_generated_DashboardsService_UpdateDashboard_async", + "title": "DashboardsService updateDashboard Sample", + "origin": "API_DEFINITION", + "description": " Replaces an existing custom dashboard with a new definition. This method requires the `monitoring.dashboards.update` permission on the specified dashboard. For more information, see [Cloud Identity and Access Management](https://cloud.google.com/iam).", + "canonical": true, + "file": "dashboards_service.update_dashboard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", + "async": true, + "parameters": [ + { + "name": "dashboard", + "type": ".google.monitoring.dashboard.v1.Dashboard" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.monitoring.dashboard.v1.Dashboard", + "client": { + "shortName": "DashboardsServiceClient", + "fullName": "google.monitoring.dashboard.v1.DashboardsServiceClient" + }, + "method": { + "shortName": "UpdateDashboard", + "fullName": "google.monitoring.dashboard.v1.DashboardsService.UpdateDashboard", + "service": { + "shortName": "DashboardsService", + "fullName": "google.monitoring.dashboard.v1.DashboardsService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 63c657bcd0553d928af9666cbe7866d6c1ac5b3c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 02:32:20 +0200 Subject: [PATCH 167/181] chore(deps): update dependency @types/mocha to v9 (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index b69bef161a1..44ac40a962c 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -30,7 +30,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", From a8cd9c02d6a75a136762811d8d3718f132e906b9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:38:27 +0200 Subject: [PATCH 168/181] chore(deps): update dependency sinon to v14 (#269) 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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 44ac40a962c..63ed118fbdb 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -42,7 +42,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 6421150d9a507b46abec61e06ee7a5eef8817633 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 20 May 2022 11:13:38 -0700 Subject: [PATCH 169/181] build!: update library to use Node 12 (#270) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-monitoring-dashboard/package.json | 10 +++++----- .../google-monitoring-dashboard/samples/package.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 63ed118fbdb..c347db97b67 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -27,28 +27,28 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", - "gts": "^3.0.0", + "gts": "^3.1.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^3.8.3", + "typescript": "^4.6.4", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12.0.0" } } diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 5838bed60cb..e127a359874 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/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 194dcc2ef6f9036540126812b85eb730f909399c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:12:14 +0200 Subject: [PATCH 170/181] chore(deps): update dependency jsdoc-region-tag to v2 (#277) 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.2` -> `^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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index c347db97b67..7c98b953afd 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -37,7 +37,7 @@ "gts": "^3.1.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", From afc77fd65b6d02066b4cb2f2379adb6d3350fd0c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:28:10 +0200 Subject: [PATCH 171/181] chore(deps): update dependency jsdoc-fresh to v2 (#276) 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.1` -> `^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-monitoring-dashboards). --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 7c98b953afd..affb7d82d13 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -36,7 +36,7 @@ "c8": "^7.0.0", "gts": "^3.1.0", "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", From ca2f7dcc79cd587b8fc1b83e7e75aadb30e1a947 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:42:04 -0700 Subject: [PATCH 172/181] fix(docs): describe fallback rest option (#281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docs): describe fallback rest option Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/dashboards_service_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index ec613a1af10..2a0c54495ee 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -71,7 +71,7 @@ export class DashboardsServiceClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -94,11 +94,10 @@ export class DashboardsServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 53efcce0280e2a953ba139afcbb2924930c8de5a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 01:47:03 +0200 Subject: [PATCH 173/181] chore(deps): update dependency linkinator to v4 (#286) --- packages/google-monitoring-dashboard/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index affb7d82d13..9cc55eed1ab 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -38,7 +38,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.0.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From f168eb38b5fb70e74290f78241f8d6ec4234d8c1 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:08:11 +0000 Subject: [PATCH 174/181] fix: better support for fallback mode (#289) - [ ] 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/dashboards_service.create_dashboard.js | 3 + .../v1/dashboards_service.delete_dashboard.js | 3 + .../v1/dashboards_service.get_dashboard.js | 3 + .../v1/dashboards_service.list_dashboards.js | 3 + .../v1/dashboards_service.update_dashboard.js | 3 + ...tadata.google.monitoring.dashboard.v1.json | 10 +- .../src/v1/dashboards_service_client.ts | 8 +- .../test/gapic_dashboards_service_v1.ts | 160 +++++++++--------- 8 files changed, 105 insertions(+), 88 deletions(-) diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js index a57de83932f..23ba816dbfb 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js @@ -23,6 +23,9 @@ function main(parent, dashboard) { // [START monitoring_v1_generated_DashboardsService_CreateDashboard_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-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js index b18a86cd5f9..9f1b5cd2fb0 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js @@ -23,6 +23,9 @@ function main(name) { // [START monitoring_v1_generated_DashboardsService_DeleteDashboard_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-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js index 9594ed7c9f1..bb5aff74bd7 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js @@ -23,6 +23,9 @@ function main(name) { // [START monitoring_v1_generated_DashboardsService_GetDashboard_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-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js index 674a79b86d8..e2079fc137d 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js @@ -23,6 +23,9 @@ function main(parent) { // [START monitoring_v1_generated_DashboardsService_ListDashboards_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-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js index 39e61da4ab8..37edb0b76b7 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js +++ b/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js @@ -23,6 +23,9 @@ function main(dashboard) { // [START monitoring_v1_generated_DashboardsService_UpdateDashboard_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-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json index 67d47f2dfb4..fa6b72c5e49 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 56, "type": "FULL" } ], @@ -158,7 +158,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 58, "type": "FULL" } ], diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 2a0c54495ee..5a772ed06cd 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -28,7 +28,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'); /** @@ -262,7 +261,8 @@ export class DashboardsServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -876,7 +876,7 @@ export class DashboardsServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDashboards.createStream( - this.innerApiCalls.listDashboards as gax.GaxCall, + this.innerApiCalls.listDashboards as GaxCall, request, callSettings ); @@ -929,7 +929,7 @@ export class DashboardsServiceClient { this.initialize(); return this.descriptors.page.listDashboards.asyncIterate( this.innerApiCalls['listDashboards'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 6bf2167191c..5e8085d9a5c 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v1.DashboardsServiceClient', () => { - it('has servicePath', () => { - const servicePath = - dashboardsserviceModule.v1.DashboardsServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - dashboardsserviceModule.v1.DashboardsServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = dashboardsserviceModule.v1.DashboardsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + dashboardsserviceModule.v1.DashboardsServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + dashboardsserviceModule.v1.DashboardsServiceClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = dashboardsserviceModule.v1.DashboardsServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.dashboardsServiceStub, undefined); - await client.initialize(); - assert(client.dashboardsServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient(); + assert(client); }); - client.initialize(); - assert(client.dashboardsServiceStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dashboardsServiceStub, undefined); + await client.initialize(); + assert(client.dashboardsServiceStub); }); - assert.strictEqual(client.dashboardsServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dashboardsServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dashboardsServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dashboardsserviceModule.v1.DashboardsServiceClient({ + 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('createDashboard', () => { From 953d497b240b0d86781bc585befd21c77494d206 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:13 +0000 Subject: [PATCH 175/181] fix: change import long to require (#290) 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 | 544 ++- .../protos/protos.js | 3441 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 3010 insertions(+), 999 deletions(-) diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 38361636eff..8135770eb91 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/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 { @@ -114,6 +114,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlertChart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CollapsibleGroup. */ @@ -204,6 +211,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CollapsibleGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Aggregation. */ @@ -312,6 +326,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Aggregation { @@ -458,6 +479,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PickTimeSeriesFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PickTimeSeriesFilter { @@ -574,6 +602,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatisticalTimeSeriesFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StatisticalTimeSeriesFilter { @@ -724,6 +759,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dashboard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DashboardFilter. */ @@ -835,6 +877,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DashboardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DashboardFilter { @@ -944,6 +993,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GridLayout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MosaicLayout. */ @@ -1040,6 +1096,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MosaicLayout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MosaicLayout { @@ -1156,6 +1219,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1247,6 +1317,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowLayout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RowLayout { @@ -1345,6 +1422,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1436,6 +1520,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnLayout + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ColumnLayout { @@ -1534,6 +1625,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Column + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1676,6 +1774,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Widget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LogsPanel. */ @@ -1772,6 +1877,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogsPanel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Scorecard. */ @@ -1883,6 +1995,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scorecard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Scorecard { @@ -1981,6 +2100,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GaugeView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SparkChartView. */ @@ -2077,6 +2203,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SparkChartView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2189,6 +2322,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeSeriesFilter. */ @@ -2306,6 +2446,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeSeriesFilterRatio. */ @@ -2423,6 +2570,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesFilterRatio + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TimeSeriesFilterRatio { @@ -2521,6 +2675,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RatioPart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2636,6 +2797,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Threshold + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Threshold { @@ -2757,6 +2925,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TimeSeriesTable { @@ -2867,6 +3042,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableDataSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2958,6 +3140,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableDisplayOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Text. */ @@ -3054,6 +3243,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Text + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Text { @@ -3190,6 +3386,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for XyChart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace XyChart { @@ -3306,6 +3509,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DataSet { @@ -3421,6 +3631,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Axis + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Axis { @@ -3522,6 +3739,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChartOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ChartOptions { @@ -3629,35 +3853,35 @@ export namespace google { namespace DashboardsService { /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|createDashboard}. * @param error Error, if any * @param [response] Dashboard */ type CreateDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|listDashboards}. * @param error Error, if any * @param [response] ListDashboardsResponse */ type ListDashboardsCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.ListDashboardsResponse) => void; /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|getDashboard}. * @param error Error, if any * @param [response] Dashboard */ type GetDashboardCallback = (error: (Error|null), response?: google.monitoring.dashboard.v1.Dashboard) => void; /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|deleteDashboard}. * @param error Error, if any * @param [response] Empty */ type DeleteDashboardCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|updateDashboard}. * @param error Error, if any * @param [response] Dashboard */ @@ -3764,6 +3988,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDashboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDashboardsRequest. */ @@ -3866,6 +4097,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDashboardsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDashboardsResponse. */ @@ -3962,6 +4200,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDashboardsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetDashboardRequest. */ @@ -4052,6 +4297,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDashboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDashboardRequest. */ @@ -4142,6 +4394,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDashboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDashboardRequest. */ @@ -4238,6 +4497,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDashboardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -4382,6 +4648,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -4494,6 +4767,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Http. */ @@ -4590,6 +4870,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. */ @@ -4737,6 +5024,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. */ @@ -4833,6 +5127,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; } } @@ -4927,6 +5228,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. */ @@ -4967,6 +5275,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -5014,6 +5325,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 @@ -5083,6 +5397,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. */ @@ -5227,6 +5548,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 { @@ -5331,6 +5659,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. */ @@ -5427,6 +5762,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; } } @@ -5518,6 +5860,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. */ @@ -5668,6 +6017,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 { @@ -5796,6 +6152,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. */ @@ -5910,6 +6273,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 { @@ -6008,6 +6378,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; } } @@ -6111,6 +6488,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. */ @@ -6213,6 +6597,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. */ @@ -6333,6 +6724,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. */ @@ -6546,6 +6944,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 { @@ -6673,6 +7078,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. */ @@ -6690,6 +7102,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -6727,6 +7142,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -6805,6 +7223,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 { @@ -6912,6 +7337,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. */ @@ -7014,6 +7446,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. */ @@ -7110,6 +7549,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. */ @@ -7212,6 +7658,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. */ @@ -7320,6 +7773,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 { @@ -7456,6 +7916,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 { @@ -7554,6 +8021,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; } } @@ -7645,6 +8119,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 { @@ -7761,6 +8242,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; } } @@ -7852,6 +8340,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 { @@ -7870,6 +8365,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. */ @@ -7893,6 +8391,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 @@ -7962,6 +8463,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 + } } } @@ -8059,6 +8577,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -8143,6 +8668,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; } } } diff --git a/packages/google-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index c2a9f3059b7..a83fc6d8734 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/protos/protos.js @@ -158,9 +158,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; @@ -250,6 +251,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AlertChart + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.AlertChart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AlertChart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.AlertChart"; + }; + return AlertChart; })(); @@ -345,9 +361,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.collapsed = reader.bool(); - break; + case 1: { + message.collapsed = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -437,6 +454,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CollapsibleGroup + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.CollapsibleGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CollapsibleGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.CollapsibleGroup"; + }; + return CollapsibleGroup; })(); @@ -567,20 +599,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 2: - message.perSeriesAligner = reader.int32(); - break; - case 4: - message.crossSeriesReducer = reader.int32(); - break; - case 5: - if (!(message.groupByFields && message.groupByFields.length)) - message.groupByFields = []; - message.groupByFields.push(reader.string()); - break; + case 1: { + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.perSeriesAligner = reader.int32(); + break; + } + case 4: { + message.crossSeriesReducer = reader.int32(); + break; + } + case 5: { + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -884,6 +920,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Aggregation + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Aggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Aggregation"; + }; + /** * Aligner enum. * @name google.monitoring.dashboard.v1.Aggregation.Aligner @@ -1087,15 +1138,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rankingMethod = reader.int32(); - break; - case 2: - message.numTimeSeries = reader.int32(); - break; - case 3: - message.direction = reader.int32(); - break; + case 1: { + message.rankingMethod = reader.int32(); + break; + } + case 2: { + message.numTimeSeries = reader.int32(); + break; + } + case 3: { + message.direction = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1253,6 +1307,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PickTimeSeriesFilter + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.PickTimeSeriesFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PickTimeSeriesFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.PickTimeSeriesFilter"; + }; + /** * Method enum. * @name google.monitoring.dashboard.v1.PickTimeSeriesFilter.Method @@ -1397,12 +1466,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rankingMethod = reader.int32(); - break; - case 2: - message.numTimeSeries = reader.int32(); - break; + case 1: { + message.rankingMethod = reader.int32(); + break; + } + case 2: { + message.numTimeSeries = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1514,6 +1585,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StatisticalTimeSeriesFilter + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatisticalTimeSeriesFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter"; + }; + /** * Method enum. * @name google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.Method @@ -1729,54 +1815,63 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 4: - message.etag = reader.string(); - break; - case 5: - message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); - break; - case 6: - message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.decode(reader, reader.uint32()); - break; - case 8: - message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); - break; - case 9: - message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.dashboardFilters && message.dashboardFilters.length)) - message.dashboardFilters = []; - message.dashboardFilters.push($root.google.monitoring.dashboard.v1.DashboardFilter.decode(reader, reader.uint32())); - break; - case 12: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.gridLayout = $root.google.monitoring.dashboard.v1.GridLayout.decode(reader, reader.uint32()); + break; + } + case 6: { + message.mosaicLayout = $root.google.monitoring.dashboard.v1.MosaicLayout.decode(reader, reader.uint32()); + break; + } + case 8: { + message.rowLayout = $root.google.monitoring.dashboard.v1.RowLayout.decode(reader, reader.uint32()); + break; + } + case 9: { + message.columnLayout = $root.google.monitoring.dashboard.v1.ColumnLayout.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.dashboardFilters && message.dashboardFilters.length)) + message.dashboardFilters = []; + message.dashboardFilters.push($root.google.monitoring.dashboard.v1.DashboardFilter.decode(reader, reader.uint32())); + break; + } + case 12: { + 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; @@ -2011,6 +2106,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Dashboard + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Dashboard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dashboard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Dashboard"; + }; + return Dashboard; })(); @@ -2153,18 +2263,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.labelKey = reader.string(); - break; - case 3: - message.templateVariable = reader.string(); - break; - case 4: - message.stringValue = reader.string(); - break; - case 5: - message.filterType = reader.int32(); - break; + case 1: { + message.labelKey = reader.string(); + break; + } + case 3: { + message.templateVariable = reader.string(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + case 5: { + message.filterType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2317,6 +2431,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DashboardFilter + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.DashboardFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DashboardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.DashboardFilter"; + }; + /** * FilterType enum. * @name google.monitoring.dashboard.v1.DashboardFilter.FilterType @@ -2447,14 +2576,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.columns = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; + case 1: { + message.columns = reader.int64(); + break; + } + case 2: { + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2584,6 +2715,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GridLayout + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.GridLayout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GridLayout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.GridLayout"; + }; + return GridLayout; })(); @@ -2692,14 +2838,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.columns = reader.int32(); - break; - case 3: - if (!(message.tiles && message.tiles.length)) - message.tiles = []; - message.tiles.push($root.google.monitoring.dashboard.v1.MosaicLayout.Tile.decode(reader, reader.uint32())); - break; + case 1: { + message.columns = reader.int32(); + break; + } + case 3: { + if (!(message.tiles && message.tiles.length)) + message.tiles = []; + message.tiles.push($root.google.monitoring.dashboard.v1.MosaicLayout.Tile.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2815,6 +2963,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MosaicLayout + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.MosaicLayout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MosaicLayout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.MosaicLayout"; + }; + MosaicLayout.Tile = (function() { /** @@ -2951,21 +3114,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.xPos = reader.int32(); - break; - case 2: - message.yPos = reader.int32(); - break; - case 3: - message.width = reader.int32(); - break; - case 4: - message.height = reader.int32(); - break; - case 5: - message.widget = $root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32()); - break; + case 1: { + message.xPos = reader.int32(); + break; + } + case 2: { + message.yPos = reader.int32(); + break; + } + case 3: { + message.width = reader.int32(); + break; + } + case 4: { + message.height = reader.int32(); + break; + } + case 5: { + message.widget = $root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3093,6 +3261,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Tile + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.MosaicLayout.Tile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.MosaicLayout.Tile"; + }; + return Tile; })(); @@ -3193,11 +3376,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.monitoring.dashboard.v1.RowLayout.Row.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3304,6 +3488,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RowLayout + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.RowLayout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowLayout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.RowLayout"; + }; + RowLayout.Row = (function() { /** @@ -3409,14 +3608,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.weight = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; + case 1: { + message.weight = reader.int64(); + break; + } + case 2: { + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3546,6 +3747,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.RowLayout.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.RowLayout.Row"; + }; + return Row; })(); @@ -3646,11 +3862,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.monitoring.dashboard.v1.ColumnLayout.Column.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3757,6 +3974,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ColumnLayout + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.ColumnLayout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnLayout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.ColumnLayout"; + }; + ColumnLayout.Column = (function() { /** @@ -3862,16 +4094,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.weight = reader.int64(); - break; - case 2: - if (!(message.widgets && message.widgets.length)) - message.widgets = []; - message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); + case 1: { + message.weight = reader.int64(); + break; + } + case 2: { + if (!(message.widgets && message.widgets.length)) + message.widgets = []; + message.widgets.push($root.google.monitoring.dashboard.v1.Widget.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -3999,6 +4233,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Column + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.ColumnLayout.Column + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Column.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.ColumnLayout.Column"; + }; + return Column; })(); @@ -4199,33 +4448,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); - break; - case 3: - message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); - break; - case 4: - message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); - break; - case 5: - message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - case 7: - message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.decode(reader, reader.uint32()); - break; - case 8: - message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.decode(reader, reader.uint32()); - break; - case 9: - message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.decode(reader, reader.uint32()); - break; - case 10: - message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.decode(reader, reader.uint32()); - break; + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.xyChart = $root.google.monitoring.dashboard.v1.XyChart.decode(reader, reader.uint32()); + break; + } + case 3: { + message.scorecard = $root.google.monitoring.dashboard.v1.Scorecard.decode(reader, reader.uint32()); + break; + } + case 4: { + message.text = $root.google.monitoring.dashboard.v1.Text.decode(reader, reader.uint32()); + break; + } + case 5: { + message.blank = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + case 7: { + message.alertChart = $root.google.monitoring.dashboard.v1.AlertChart.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeSeriesTable = $root.google.monitoring.dashboard.v1.TimeSeriesTable.decode(reader, reader.uint32()); + break; + } + case 9: { + message.collapsibleGroup = $root.google.monitoring.dashboard.v1.CollapsibleGroup.decode(reader, reader.uint32()); + break; + } + case 10: { + message.logsPanel = $root.google.monitoring.dashboard.v1.LogsPanel.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4474,6 +4732,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Widget + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Widget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Widget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Widget"; + }; + return Widget; })(); @@ -4582,14 +4855,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push(reader.string()); - break; + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -4700,6 +4975,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LogsPanel + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.LogsPanel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogsPanel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.LogsPanel"; + }; + return LogsPanel; })(); @@ -4844,20 +5134,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 4: - message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); - break; - case 5: - message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); - break; + case 1: { + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gaugeView = $root.google.monitoring.dashboard.v1.Scorecard.GaugeView.decode(reader, reader.uint32()); + break; + } + case 5: { + message.sparkChartView = $root.google.monitoring.dashboard.v1.Scorecard.SparkChartView.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5017,6 +5311,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Scorecard + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Scorecard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Scorecard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Scorecard"; + }; + Scorecard.GaugeView = (function() { /** @@ -5120,12 +5429,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.lowerBound = reader.double(); - break; - case 2: - message.upperBound = reader.double(); - break; + case 1: { + message.lowerBound = reader.double(); + break; + } + case 2: { + message.upperBound = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -5224,6 +5535,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GaugeView + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Scorecard.GaugeView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GaugeView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Scorecard.GaugeView"; + }; + return GaugeView; })(); @@ -5330,12 +5656,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sparkChartType = reader.int32(); - break; - case 2: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.sparkChartType = reader.int32(); + break; + } + case 2: { + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5457,6 +5785,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SparkChartView + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Scorecard.SparkChartView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkChartView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Scorecard.SparkChartView"; + }; + return SparkChartView; })(); @@ -5602,18 +5945,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 2: - message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); - break; - case 3: - message.timeSeriesQueryLanguage = reader.string(); - break; - case 5: - message.unitOverride = reader.string(); - break; + case 1: { + message.timeSeriesFilter = $root.google.monitoring.dashboard.v1.TimeSeriesFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.timeSeriesFilterRatio = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timeSeriesQueryLanguage = reader.string(); + break; + } + case 5: { + message.unitOverride = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5756,6 +6103,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesQuery + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesQuery"; + }; + return TimeSeriesQuery; })(); @@ -5909,21 +6271,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); - break; + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6079,6 +6446,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesFilter + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesFilter"; + }; + return TimeSeriesFilter; })(); @@ -6232,21 +6614,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 2: - message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); - break; - case 3: - message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; - case 4: - message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); - break; - case 5: - message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); - break; + case 1: { + message.numerator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + } + case 2: { + message.denominator = $root.google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart.decode(reader, reader.uint32()); + break; + } + case 3: { + message.secondaryAggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.pickTimeSeriesFilter = $root.google.monitoring.dashboard.v1.PickTimeSeriesFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.statisticalTimeSeriesFilter = $root.google.monitoring.dashboard.v1.StatisticalTimeSeriesFilter.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6407,6 +6794,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesFilterRatio + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesFilterRatio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesFilterRatio"; + }; + TimeSeriesFilterRatio.RatioPart = (function() { /** @@ -6510,12 +6912,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 2: - message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); - break; + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.aggregation = $root.google.monitoring.dashboard.v1.Aggregation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6619,6 +7023,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RatioPart + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RatioPart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesFilterRatio.RatioPart"; + }; + return RatioPart; })(); @@ -6761,21 +7180,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.value = reader.double(); - break; - case 3: - message.color = reader.int32(); - break; - case 4: - message.direction = reader.int32(); - break; - case 5: - message.targetAxis = reader.int32(); - break; + case 1: { + message.label = reader.string(); + break; + } + case 2: { + message.value = reader.double(); + break; + } + case 3: { + message.color = reader.int32(); + break; + } + case 4: { + message.direction = reader.int32(); + break; + } + case 5: { + message.targetAxis = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6952,6 +7376,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Threshold + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Threshold + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Threshold.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Threshold"; + }; + /** * Color enum. * @name google.monitoring.dashboard.v1.Threshold.Color @@ -7113,11 +7552,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dataSets && message.dataSets.length)) - message.dataSets = []; - message.dataSets.push($root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7224,7 +7664,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - TimeSeriesTable.TableDataSet = (function() { + /** + * Gets the default type url for TimeSeriesTable + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesTable"; + }; + + TimeSeriesTable.TableDataSet = (function() { /** * Properties of a TableDataSet. @@ -7349,18 +7804,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 2: - message.tableTemplate = reader.string(); - break; - case 3: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tableTemplate = reader.string(); + break; + } + case 3: { + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.tableDisplayOptions = $root.google.monitoring.dashboard.v1.TableDisplayOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7490,6 +7949,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TableDataSet + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableDataSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TimeSeriesTable.TableDataSet"; + }; + return TableDataSet; })(); @@ -7590,11 +8064,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.shownColumns && message.shownColumns.length)) - message.shownColumns = []; - message.shownColumns.push(reader.string()); - break; + case 1: { + if (!(message.shownColumns && message.shownColumns.length)) + message.shownColumns = []; + message.shownColumns.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -7696,6 +8171,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TableDisplayOptions + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.TableDisplayOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableDisplayOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.TableDisplayOptions"; + }; + return TableDisplayOptions; })(); @@ -7802,12 +8292,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.format = reader.int32(); - break; + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.format = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7924,6 +8416,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Text + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.Text + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.Text"; + }; + /** * Format enum. * @name google.monitoring.dashboard.v1.Text.Format @@ -8105,31 +8612,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dataSets && message.dataSets.length)) - message.dataSets = []; - message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); - break; - case 4: - message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.thresholds && message.thresholds.length)) - message.thresholds = []; - message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); - break; - case 6: - message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 7: - message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 9: - message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); - break; - case 8: - message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.dataSets && message.dataSets.length)) + message.dataSets = []; + message.dataSets.push($root.google.monitoring.dashboard.v1.XyChart.DataSet.decode(reader, reader.uint32())); + break; + } + case 4: { + message.timeshiftDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.thresholds && message.thresholds.length)) + message.thresholds = []; + message.thresholds.push($root.google.monitoring.dashboard.v1.Threshold.decode(reader, reader.uint32())); + break; + } + case 6: { + message.xAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + } + case 7: { + message.yAxis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + } + case 9: { + message.y2Axis = $root.google.monitoring.dashboard.v1.XyChart.Axis.decode(reader, reader.uint32()); + break; + } + case 8: { + message.chartOptions = $root.google.monitoring.dashboard.v1.ChartOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8329,6 +8843,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for XyChart + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.XyChart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + XyChart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.XyChart"; + }; + XyChart.DataSet = (function() { /** @@ -8465,21 +8994,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); - break; - case 2: - message.plotType = reader.int32(); - break; - case 3: - message.legendTemplate = reader.string(); - break; - case 4: - message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.targetAxis = reader.int32(); - break; + case 1: { + message.timeSeriesQuery = $root.google.monitoring.dashboard.v1.TimeSeriesQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.plotType = reader.int32(); + break; + } + case 3: { + message.legendTemplate = reader.string(); + break; + } + case 4: { + message.minAlignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.targetAxis = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8658,6 +9192,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DataSet + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.XyChart.DataSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.XyChart.DataSet"; + }; + /** * PlotType enum. * @name google.monitoring.dashboard.v1.XyChart.DataSet.PlotType @@ -8800,12 +9349,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.label = reader.string(); - break; - case 2: - message.scale = reader.int32(); - break; + case 1: { + message.label = reader.string(); + break; + } + case 2: { + message.scale = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -8922,6 +9473,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Axis + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.XyChart.Axis + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Axis.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.XyChart.Axis"; + }; + /** * Scale enum. * @name google.monitoring.dashboard.v1.XyChart.Axis.Scale @@ -9036,9 +9602,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mode = reader.int32(); - break; + case 1: { + message.mode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -9151,6 +9718,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChartOptions + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.ChartOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChartOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.ChartOptions"; + }; + /** * Mode enum. * @name google.monitoring.dashboard.v1.ChartOptions.Mode @@ -9205,7 +9787,7 @@ }; /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#createDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|createDashboard}. * @memberof google.monitoring.dashboard.v1.DashboardsService * @typedef CreateDashboardCallback * @type {function} @@ -9238,7 +9820,7 @@ */ /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#listDashboards}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|listDashboards}. * @memberof google.monitoring.dashboard.v1.DashboardsService * @typedef ListDashboardsCallback * @type {function} @@ -9271,7 +9853,7 @@ */ /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#getDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|getDashboard}. * @memberof google.monitoring.dashboard.v1.DashboardsService * @typedef GetDashboardCallback * @type {function} @@ -9304,7 +9886,7 @@ */ /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#deleteDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|deleteDashboard}. * @memberof google.monitoring.dashboard.v1.DashboardsService * @typedef DeleteDashboardCallback * @type {function} @@ -9337,7 +9919,7 @@ */ /** - * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService#updateDashboard}. + * Callback as used by {@link google.monitoring.dashboard.v1.DashboardsService|updateDashboard}. * @memberof google.monitoring.dashboard.v1.DashboardsService * @typedef UpdateDashboardCallback * @type {function} @@ -9486,15 +10068,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9606,6 +10191,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateDashboardRequest + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.CreateDashboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDashboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.CreateDashboardRequest"; + }; + return CreateDashboardRequest; })(); @@ -9723,15 +10323,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9838,6 +10441,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDashboardsRequest + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.ListDashboardsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDashboardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.ListDashboardsRequest"; + }; + return ListDashboardsRequest; })(); @@ -9946,14 +10564,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dashboards && message.dashboards.length)) - message.dashboards = []; - message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.dashboards && message.dashboards.length)) + message.dashboards = []; + message.dashboards.push($root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10069,6 +10689,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDashboardsResponse + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.ListDashboardsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDashboardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.ListDashboardsResponse"; + }; + return ListDashboardsResponse; })(); @@ -10164,9 +10799,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; @@ -10256,6 +10892,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetDashboardRequest + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.GetDashboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDashboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.GetDashboardRequest"; + }; + return GetDashboardRequest; })(); @@ -10351,9 +11002,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; @@ -10443,6 +11095,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteDashboardRequest + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.DeleteDashboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDashboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.DeleteDashboardRequest"; + }; + return DeleteDashboardRequest; })(); @@ -10549,12 +11216,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 1: { + message.dashboard = $root.google.monitoring.dashboard.v1.Dashboard.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10658,6 +11327,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateDashboardRequest + * @function getTypeUrl + * @memberof google.monitoring.dashboard.v1.UpdateDashboardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDashboardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.dashboard.v1.UpdateDashboardRequest"; + }; + return UpdateDashboardRequest; })(); @@ -10870,39 +11554,46 @@ 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; + 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; @@ -11097,6 +11788,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -11233,12 +11939,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11337,6 +12045,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -11445,14 +12168,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; @@ -11568,6 +12293,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; })(); @@ -11778,38 +12518,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; @@ -12031,6 +12781,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; })(); @@ -12137,12 +12902,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; @@ -12241,6 +13008,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; })(); @@ -12350,11 +13132,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; @@ -12461,6 +13244,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; })(); @@ -12482,6 +13280,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 */ /** @@ -12602,6 +13401,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 @@ -12657,6 +13464,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; }; @@ -12691,66 +13500,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; @@ -12862,6 +13687,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; }; @@ -12954,6 +13782,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -12985,6 +13815,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -13031,6 +13862,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; }; @@ -13045,6 +13878,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; })(); @@ -13255,52 +14103,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; @@ -13601,6 +14459,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() { /** @@ -13715,16 +14588,19 @@ 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: + 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; } @@ -13835,6 +14711,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; })(); @@ -13941,12 +14832,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; @@ -14045,6 +14938,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; })(); @@ -14145,11 +15053,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; @@ -14256,6 +15165,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; })(); @@ -14461,39 +15385,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; @@ -14780,6 +15715,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 @@ -14948,12 +15898,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; @@ -15057,6 +16009,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; })(); @@ -15202,27 +16169,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; @@ -15398,6 +16370,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() { /** @@ -15501,12 +16488,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; @@ -15605,6 +16594,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; })(); @@ -15725,15 +16729,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; @@ -15845,6 +16852,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; })(); @@ -15964,17 +16986,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; @@ -16104,6 +17129,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; })(); @@ -16254,24 +17294,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; @@ -16407,6 +17453,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; })(); @@ -16737,76 +17798,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -17119,6 +18202,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 @@ -17287,26 +18385,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17460,6 +18564,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; })(); @@ -17473,6 +18592,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -17529,6 +18649,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -17605,6 +18733,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(); @@ -17650,42 +18780,55 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17745,6 +18888,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"; @@ -17830,6 +18976,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) @@ -17917,6 +19065,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -17931,6 +19080,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) @@ -17957,6 +19108,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 @@ -18086,11 +19252,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; @@ -18197,6 +19364,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; })(); @@ -18314,19 +19496,22 @@ 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; + 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; @@ -18451,6 +19636,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; })(); @@ -18559,14 +19759,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; @@ -18682,6 +19884,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; })(); @@ -18812,20 +20029,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; @@ -18958,6 +20179,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; })(); @@ -19101,25 +20337,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -19296,6 +20537,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 @@ -19475,29 +20731,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; @@ -19610,7 +20873,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); @@ -19691,6 +20954,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() { /** @@ -19792,12 +21070,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; @@ -19898,6 +21178,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; })(); @@ -19998,11 +21293,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; @@ -20109,6 +21405,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() { /** @@ -20257,37 +21568,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; @@ -20448,6 +21764,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; })(); @@ -20548,11 +21879,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; @@ -20659,6 +21991,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() { /** @@ -20669,6 +22016,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 */ /** @@ -20719,6 +22067,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 @@ -20755,6 +22111,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; }; @@ -20789,25 +22147,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; @@ -20859,6 +22225,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; }; @@ -20887,6 +22262,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; }; @@ -20909,6 +22298,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -20921,6 +22311,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; }; @@ -20935,6 +22327,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; })(); @@ -21044,12 +22467,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; @@ -21162,6 +22587,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; })(); @@ -21322,6 +22762,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; })(); diff --git a/packages/google-monitoring-dashboard/protos/protos.json b/packages/google-monitoring-dashboard/protos/protos.json index d7b61e3950e..5ecf5c2d874 100644 --- a/packages/google-monitoring-dashboard/protos/protos.json +++ b/packages/google-monitoring-dashboard/protos/protos.json @@ -1349,6 +1349,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -1877,6 +1881,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2169,6 +2180,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 1b4c34e918e0dbf6326cd32719bf08875280b87e 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:56:16 +0000 Subject: [PATCH 176/181] fix: do not import the whole google-gax from proto JS (#1553) (#293) 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-monitoring-dashboard/package.json | 2 +- packages/google-monitoring-dashboard/protos/protos.d.ts | 2 +- packages/google-monitoring-dashboard/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 9cc55eed1ab..6307e7b08b0 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -27,7 +27,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-monitoring-dashboard/protos/protos.d.ts b/packages/google-monitoring-dashboard/protos/protos.d.ts index 8135770eb91..a2cec527d8f 100644 --- a/packages/google-monitoring-dashboard/protos/protos.d.ts +++ b/packages/google-monitoring-dashboard/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-monitoring-dashboard/protos/protos.js b/packages/google-monitoring-dashboard/protos/protos.js index a83fc6d8734..2549aa08c3b 100644 --- a/packages/google-monitoring-dashboard/protos/protos.js +++ b/packages/google-monitoring-dashboard/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 19798e2f7692df1d116a63d77e102d35192bb11a 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:42:34 +0000 Subject: [PATCH 177/181] fix: allow passing gax instance to client constructor (#294) - [ ] 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/dashboards_service_client.ts | 41 ++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 5a772ed06cd..3804621fd3e 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,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 './dashboards_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -97,8 +95,18 @@ export class DashboardsServiceClient { * 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 DashboardsServiceClient({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 DashboardsServiceClient; const servicePath = @@ -118,8 +126,13 @@ export class DashboardsServiceClient { 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); @@ -199,7 +212,7 @@ export class DashboardsServiceClient { 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; } /** @@ -424,7 +437,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -523,7 +536,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -620,7 +633,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -718,7 +731,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'dashboard.name': request.dashboard!.name || '', }); this.initialize(); @@ -826,7 +839,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -869,7 +882,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDashboards']; @@ -921,7 +934,7 @@ export class DashboardsServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listDashboards']; From b3ece57ba65adb1d559ce7804f98f331d2c7a428 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:34:15 +0000 Subject: [PATCH 178/181] fix: preserve default values in x-goog-request-params header (#296) - [ ] 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/dashboards_service_client.ts | 14 +- .../test/gapic_dashboards_service_v1.ts | 524 ++++++++++-------- 2 files changed, 285 insertions(+), 253 deletions(-) diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index 3804621fd3e..09fa08ad645 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -438,7 +438,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createDashboard(request, options, callback); @@ -537,7 +537,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getDashboard(request, options, callback); @@ -634,7 +634,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteDashboard(request, options, callback); @@ -732,7 +732,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'dashboard.name': request.dashboard!.name || '', + 'dashboard.name': request.dashboard!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateDashboard(request, options, callback); @@ -840,7 +840,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listDashboards(request, options, callback); @@ -883,7 +883,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDashboards']; const callSettings = defaultCallSettings.merge(options); @@ -935,7 +935,7 @@ export class DashboardsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listDashboards']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 5e8085d9a5c..8f2d017d438 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -222,26 +237,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); client.innerApiCalls.createDashboard = stubSimpleCall(expectedResponse); const [response] = await client.createDashboard(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDashboard without error using callback', async () => { @@ -253,15 +267,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); @@ -284,11 +294,14 @@ describe('v1.DashboardsServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDashboard with error', async () => { @@ -300,26 +313,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createDashboard = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createDashboard(request), expectedError); - assert( - (client.innerApiCalls.createDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createDashboard with closed client', async () => { @@ -331,7 +343,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createDashboard(request), expectedError); @@ -348,26 +363,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); client.innerApiCalls.getDashboard = stubSimpleCall(expectedResponse); const [response] = await client.getDashboard(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDashboard without error using callback', async () => { @@ -379,15 +393,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); @@ -410,11 +420,14 @@ describe('v1.DashboardsServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDashboard with error', async () => { @@ -426,26 +439,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getDashboard = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getDashboard(request), expectedError); - assert( - (client.innerApiCalls.getDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getDashboard with closed client', async () => { @@ -457,7 +469,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getDashboard(request), expectedError); @@ -474,26 +489,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteDashboard = stubSimpleCall(expectedResponse); const [response] = await client.deleteDashboard(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDashboard without error using callback', async () => { @@ -505,15 +519,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -536,11 +546,14 @@ describe('v1.DashboardsServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDashboard with error', async () => { @@ -552,26 +565,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteDashboard = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteDashboard(request), expectedError); - assert( - (client.innerApiCalls.deleteDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteDashboard with closed client', async () => { @@ -583,7 +595,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteDashboard(request), expectedError); @@ -600,27 +615,27 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); - request.dashboard = {}; - request.dashboard.name = ''; - const expectedHeaderRequestParams = 'dashboard.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.dashboard ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ + 'dashboard', + 'name', + ]); + request.dashboard.name = defaultValue1; + const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); client.innerApiCalls.updateDashboard = stubSimpleCall(expectedResponse); const [response] = await client.updateDashboard(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDashboard without error using callback', async () => { @@ -632,16 +647,13 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); - request.dashboard = {}; - request.dashboard.name = ''; - const expectedHeaderRequestParams = 'dashboard.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.dashboard ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ + 'dashboard', + 'name', + ]); + request.dashboard.name = defaultValue1; + const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() ); @@ -664,11 +676,14 @@ describe('v1.DashboardsServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDashboard with error', async () => { @@ -680,27 +695,27 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); - request.dashboard = {}; - request.dashboard.name = ''; - const expectedHeaderRequestParams = 'dashboard.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.dashboard ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ + 'dashboard', + 'name', + ]); + request.dashboard.name = defaultValue1; + const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateDashboard = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateDashboard(request), expectedError); - assert( - (client.innerApiCalls.updateDashboard as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDashboard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateDashboard with closed client', async () => { @@ -712,8 +727,12 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); - request.dashboard = {}; - request.dashboard.name = ''; + request.dashboard ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ + 'dashboard', + 'name', + ]); + request.dashboard.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateDashboard(request), expectedError); @@ -730,15 +749,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() @@ -753,11 +768,14 @@ describe('v1.DashboardsServiceClient', () => { client.innerApiCalls.listDashboards = stubSimpleCall(expectedResponse); const [response] = await client.listDashboards(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDashboards as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDashboards without error using callback', async () => { @@ -769,15 +787,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() @@ -808,11 +822,14 @@ describe('v1.DashboardsServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listDashboards as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDashboards with error', async () => { @@ -824,26 +841,25 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listDashboards = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listDashboards(request), expectedError); - assert( - (client.innerApiCalls.listDashboards as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDashboards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listDashboardsStream without error', async () => { @@ -855,8 +871,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() @@ -893,11 +912,12 @@ describe('v1.DashboardsServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDashboards, request) ); - assert.strictEqual( - ( - client.descriptors.page.listDashboards.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDashboards.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -910,8 +930,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDashboards.createStream = stubPageStreamingCall(undefined, expectedError); @@ -937,11 +960,12 @@ describe('v1.DashboardsServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listDashboards, request) ); - assert.strictEqual( - ( - client.descriptors.page.listDashboards.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDashboards.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -954,8 +978,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.monitoring.dashboard.v1.Dashboard() @@ -981,11 +1008,12 @@ describe('v1.DashboardsServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listDashboards.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDashboards.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -998,8 +1026,11 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listDashboards.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1017,11 +1048,12 @@ describe('v1.DashboardsServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listDashboards.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listDashboards.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 904644df933a8e35f6ddc92a4bd3a957b2380bf9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 14:17:53 -0700 Subject: [PATCH 179/181] build: use fully qualified request type name in tests (#299) 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_dashboards_service_v1.ts | 165 ++++++++++-------- 1 file changed, 92 insertions(+), 73 deletions(-) diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 8f2d017d438..c117824f3e8 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -237,9 +237,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.CreateDashboardRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -267,9 +268,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.CreateDashboardRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -313,9 +315,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.CreateDashboardRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -343,9 +346,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateDashboardRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.CreateDashboardRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -363,9 +367,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.GetDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -393,9 +398,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.GetDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -439,9 +445,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.GetDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -469,9 +476,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('GetDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.GetDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -489,9 +497,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.DeleteDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -519,9 +528,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.DeleteDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -565,9 +575,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.DeleteDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -595,9 +606,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteDashboardRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.DeleteDashboardRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -616,10 +628,10 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); request.dashboard ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ - 'dashboard', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.UpdateDashboardRequest', + ['dashboard', 'name'] + ); request.dashboard.name = defaultValue1; const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -648,10 +660,10 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); request.dashboard ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ - 'dashboard', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.UpdateDashboardRequest', + ['dashboard', 'name'] + ); request.dashboard.name = defaultValue1; const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -696,10 +708,10 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); request.dashboard ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ - 'dashboard', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.UpdateDashboardRequest', + ['dashboard', 'name'] + ); request.dashboard.name = defaultValue1; const expectedHeaderRequestParams = `dashboard.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -728,10 +740,10 @@ describe('v1.DashboardsServiceClient', () => { new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); request.dashboard ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateDashboardRequest', [ - 'dashboard', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.UpdateDashboardRequest', + ['dashboard', 'name'] + ); request.dashboard.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -749,9 +761,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -787,9 +800,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -841,9 +855,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -871,9 +886,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -930,9 +946,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -978,9 +995,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1026,9 +1044,10 @@ describe('v1.DashboardsServiceClient', () => { const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListDashboardsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.monitoring.dashboard.v1.ListDashboardsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From 079c8a901eca7322717bbb0da5ad65e84eb4d867 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 19:22:16 -0700 Subject: [PATCH 180/181] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- .../google-monitoring-dashboard/.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 2 +- .../google-monitoring-dashboard/README.md | 20 ++- .../google-monitoring-dashboard/package.json | 4 +- .../samples/README.md | 120 +++++++++++++++++- .../google-monitoring-dashboard/src/index.ts | 2 +- release-please-config.json | 1 + 10 files changed, 137 insertions(+), 23 deletions(-) rename packages/google-monitoring-dashboard/{.github => }/.OwlBot.yaml (80%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b1dca16e06..78516e1997d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -20,5 +20,6 @@ "packages/google-devtools-artifactregistry": "2.0.0", "packages/google-iam": "0.2.0", "packages/google-maps-routing": "0.1.1", + "packages/google-monitoring-dashboard": "2.7.0", "packages/typeless-sample-bot": "1.0.0" } diff --git a/packages/google-monitoring-dashboard/.github/.OwlBot.yaml b/packages/google-monitoring-dashboard/.OwlBot.yaml similarity index 80% rename from packages/google-monitoring-dashboard/.github/.OwlBot.yaml rename to packages/google-monitoring-dashboard/.OwlBot.yaml index 7e59ec3d2b6..682d2532caf 100644 --- a/packages/google-monitoring-dashboard/.github/.OwlBot.yaml +++ b/packages/google-monitoring-dashboard/.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/monitoring/dashboard/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/monitoring/dashboard/(v.*)/.*-nodejs + dest: /owl-bot-staging/google-monitoring-dashboard/$1 begin-after-commit-hash: dea0fe87a4015bc79a036811aafe13c8f9aa8528 diff --git a/packages/google-monitoring-dashboard/.mocharc.js b/packages/google-monitoring-dashboard/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-monitoring-dashboard/.mocharc.js +++ b/packages/google-monitoring-dashboard/.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-monitoring-dashboard/.prettierrc.js b/packages/google-monitoring-dashboard/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-monitoring-dashboard/.prettierrc.js +++ b/packages/google-monitoring-dashboard/.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-monitoring-dashboard/.repo-metadata.json b/packages/google-monitoring-dashboard/.repo-metadata.json index f6d89e2e015..62c9073942e 100644 --- a/packages/google-monitoring-dashboard/.repo-metadata.json +++ b/packages/google-monitoring-dashboard/.repo-metadata.json @@ -8,7 +8,7 @@ "name_pretty": "Monitoring Dashboards", "default_version": "v1", "release_level": "stable", - "repo": "googleapis/nodejs-monitoring-dashboards", + "repo": "googleapis/google-cloud-node", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest", "requires_billing": true, "api_shortname": "monitoring", diff --git a/packages/google-monitoring-dashboard/README.md b/packages/google-monitoring-dashboard/README.md index 18cde0497df..f788d26887c 100644 --- a/packages/google-monitoring-dashboard/README.md +++ b/packages/google-monitoring-dashboard/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Monitoring Dashboards: Node.js Client](https://github.com/googleapis/nodejs-monitoring-dashboards) +# [Monitoring Dashboards: 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/monitoring-dashboards.svg)](https://www.npmjs.org/package/@google-cloud/monitoring-dashboards) @@ -14,11 +14,11 @@ interact with dashboards for viewing and analyzing metric data A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/blob/main/CHANGELOG.md). * [Monitoring Dashboards Node.js Client API Reference][client-docs] * [Monitoring Dashboards Documentation][product-docs] -* [github.com/googleapis/nodejs-monitoring-dashboards](https://github.com/googleapis/nodejs-monitoring-dashboards) +* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -84,11 +84,17 @@ listDashboards(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring-dashboards/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-monitoring-dashboards/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-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Dashboards_service.create_dashboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js,samples/README.md) | +| Dashboards_service.delete_dashboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js,samples/README.md) | +| Dashboards_service.get_dashboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js,samples/README.md) | +| Dashboards_service.list_dashboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js,samples/README.md) | +| Dashboards_service.update_dashboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/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-monitoring-dashboard/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/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-monitoring-dashboard/samples/test/quickstart.js,samples/README.md) | @@ -138,7 +144,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +156,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring-dashboards/latest [product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 6307e7b08b0..13374489b37 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -20,9 +20,9 @@ "lint": "gts check", "predocs-test": "npm run docs", "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 && cd ../", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm install", "precompile": "gts clean" }, diff --git a/packages/google-monitoring-dashboard/samples/README.md b/packages/google-monitoring-dashboard/samples/README.md index 0dbd6b2827a..37e75562193 100644 --- a/packages/google-monitoring-dashboard/samples/README.md +++ b/packages/google-monitoring-dashboard/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Monitoring Dashboards: Node.js Samples](https://github.com/googleapis/nodejs-monitoring-dashboards) +# [Monitoring Dashboards: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,18 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Dashboards_service.create_dashboard](#dashboards_service.create_dashboard) + * [Dashboards_service.delete_dashboard](#dashboards_service.delete_dashboard) + * [Dashboards_service.get_dashboard](#dashboards_service.get_dashboard) + * [Dashboards_service.list_dashboards](#dashboards_service.list_dashboards) + * [Dashboards_service.update_dashboard](#dashboards_service.update_dashboard) + * [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-monitoring-dashboards#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +35,118 @@ Before running the samples, make sure you've followed the steps outlined in +### Dashboards_service.create_dashboard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.create_dashboard.js` + + +----- + + + + +### Dashboards_service.delete_dashboard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.delete_dashboard.js` + + +----- + + + + +### Dashboards_service.get_dashboard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.get_dashboard.js` + + +----- + + + + +### Dashboards_service.list_dashboards + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.list_dashboards.js` + + +----- + + + + +### Dashboards_service.update_dashboard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/generated/v1/dashboards_service.update_dashboard.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/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-monitoring-dashboard/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-monitoring-dashboard/samples/quickstart.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-monitoring-dashboards/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-monitoring-dashboard/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring-dashboards&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-monitoring-dashboard/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-monitoring-dashboard/samples/test/quickstart.js` @@ -46,5 +154,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring-dashboards&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/monitoring/docs diff --git a/packages/google-monitoring-dashboard/src/index.ts b/packages/google-monitoring-dashboard/src/index.ts index f224f8e57a2..ada7f73ea2a 100644 --- a/packages/google-monitoring-dashboard/src/index.ts +++ b/packages/google-monitoring-dashboard/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 5b1b0902114..4a265d93a7e 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -20,6 +20,7 @@ "packages/google-devtools-artifactregistry": {}, "packages/google-iam": {}, "packages/google-maps-routing": {}, + "packages/google-monitoring-dashboard": {}, "packages/typeless-sample-bot": {} }, "plugins": [ From 83113476faf791e74411419f8d4e0772df30fbf0 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 12 Oct 2022 20:03:59 -0700 Subject: [PATCH 181/181] fix: samples test --- .../samples/package.json | 2 +- .../samples/test/quickstart.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index e127a359874..d32edc1bdfa 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -20,4 +20,4 @@ "chai": "^4.2.0", "mocha": "^8.0.0" } -} \ No newline at end of file +} diff --git a/packages/google-monitoring-dashboard/samples/test/quickstart.js b/packages/google-monitoring-dashboard/samples/test/quickstart.js index 1a591a3d6d4..095a1c9f602 100644 --- a/packages/google-monitoring-dashboard/samples/test/quickstart.js +++ b/packages/google-monitoring-dashboard/samples/test/quickstart.js @@ -18,17 +18,24 @@ const path = require('path'); const {assert} = require('chai'); const cp = require('child_process'); -const {describe, it} = require('mocha'); +const {describe, it, before} = require('mocha'); +const { + DashboardsServiceClient, +} = require('@google-cloud/monitoring-dashboards'); +// Creates a client +const ds = new DashboardsServiceClient(); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cwd = path.join(__dirname, '..'); -const PROJECT_ID = process.env.GCLOUD_PROJECT; - describe('Sample Integration Tests', () => { + let projectId; + before(async () => { + projectId = await ds.getProjectId(); + }); it('should run quickstart.js', async () => { - const stdout = execSync(`node ./quickstart.js projects/${PROJECT_ID}`, { + const stdout = execSync(`node ./quickstart.js projects/${projectId}`, { cwd, }); // build should have exited with success status.